Skip to content

Commit d9518e9

Browse files
Added service endpoints cmdlets
1 parent ddf243d commit d9518e9

21 files changed

+1821
-13
lines changed

src/ResourceManager/Network/AzureRM.Network.psd1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ CmdletsToExport = 'Add-AzureRmApplicationGatewayAuthenticationCertificate',
299299
'Get-AzureRmVirtualNetworkGatewayBgpPeerStatus',
300300
'Get-AzureRmVirtualNetworkGatewayAdvertisedRoute',
301301
'Get-AzureRmVirtualNetworkGatewayLearnedRoute',
302-
'Get-AzureRmNetworkUsage', 'Get-AzureRmVirtualNetworkUsageList'
302+
'Get-AzureRmNetworkUsage',
303+
'Get-AzureRmVirtualNetworkUsageList',
304+
'Get-AzureRmVirtualNetworkAvailableEndpointService'
303305

304306
# Variables to export from this module
305307
# VariablesToExport = @()

src/ResourceManager/Network/Commands.Network.Test/Commands.Network.Test.csproj

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@
6363
<Reference Include="Microsoft.Azure.Management.Authorization">
6464
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6565
</Reference>
66-
<Reference Include="Microsoft.Azure.Management.Network, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67-
<SpecificVersion>False</SpecificVersion>
68-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.12.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
66+
<Reference Include="Microsoft.Azure.Management.Network, Version=13.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
67+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.13.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
6968
<Private>True</Private>
7069
</Reference>
7170
<Reference Include="Microsoft.Azure.Management.ResourceManager">
@@ -107,11 +106,11 @@
107106
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.WindowsForms.dll</HintPath>
108107
</Reference>
109108
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
110-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.8\lib\net45\Microsoft.Rest.ClientRuntime.dll</HintPath>
109+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.9\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
111110
<Private>True</Private>
112111
</Reference>
113112
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
114-
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.7\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
113+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.9\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
115114
<Private>True</Private>
116115
</Reference>
117116
<Reference Include="Microsoft.Rest.ClientRuntime.Azure.TestFramework">
@@ -179,6 +178,7 @@
179178
<Compile Include="Properties\AssemblyInfo.cs" />
180179
<Compile Include="NetworkResourcesController.cs" />
181180
<Compile Include="ScenarioTests\ApplicationGatewayTests.cs" />
181+
<Compile Include="ScenarioTests\AvailableEndpointServicesTests.cs" />
182182
<Compile Include="ScenarioTests\MultiIpConfigOnNicTests.cs" />
183183
<Compile Include="ScenarioTests\ExpressRouteServiceProviderTests.cs" />
184184
<Compile Include="ScenarioTests\NetworkInterfaceTests.cs" />
@@ -210,6 +210,9 @@
210210
<None Include="ScenarioTests\ApplicationGatewayTests.ps1">
211211
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
212212
</None>
213+
<None Include="ScenarioTests\AvailableEndpointServicesTests.ps1">
214+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
215+
</None>
213216
<None Include="ScenarioTests\Data\ApplicationGatewayAuthCert.cer">
214217
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
215218
</None>
@@ -276,6 +279,9 @@
276279
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ApplicationGatewayTests\TestAvailableWafRuleSets.json">
277280
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
278281
</None>
282+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.AvailableEndpointServicesTests\TestAvailableEndpointServicesList.json">
283+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
284+
</None>
279285
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ExpressRouteCircuitTests\TestExpressRouteBgpServiceCommunitiesGet.json">
280286
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
281287
</None>
@@ -510,6 +516,7 @@
510516
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkSubnetCRUD.json">
511517
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
512518
</None>
519+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkSubnetServiceEndpoint.json" />
513520
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkUsage.json">
514521
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
515522
</None>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// ----------------------------------------------------------------------------------
2+
//
3+
// Copyright Microsoft Corporation
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
// ----------------------------------------------------------------------------------
14+
15+
using Microsoft.Azure.ServiceManagemenet.Common.Models;
16+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
17+
using Xunit;
18+
using Xunit.Abstractions;
19+
20+
namespace Commands.Network.Test.ScenarioTests
21+
{
22+
public class AvailableEndpointServicesTests : Microsoft.WindowsAzure.Commands.Test.Utilities.Common.RMTestBase
23+
{
24+
public AvailableEndpointServicesTests(ITestOutputHelper output)
25+
{
26+
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
27+
}
28+
29+
[Fact]
30+
[Trait(Category.AcceptanceType, Category.CheckIn)]
31+
public void TestAvailableEndpointServicesList()
32+
{
33+
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkAvailableEndpointServicesList");
34+
}
35+
}
36+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ----------------------------------------------------------------------------------
2+
#
3+
# Copyright Microsoft Corporation
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
# ----------------------------------------------------------------------------------
14+
15+
<#
16+
.SYNOPSIS
17+
Tests checking API to list available endpoint services.
18+
#>
19+
function Test-VirtualNetworkAvailableEndpointServicesList
20+
{
21+
$resourceTypeParent = "Microsoft.Network/virtualNetworks"
22+
$location = Get-ProviderLocation $resourceTypeParent
23+
$location = $location -replace " ",""
24+
try
25+
{
26+
$results = Get-AzureRmVirtualNetworkAvailableEndpointService -Location $location;
27+
Assert-NotNull $results;
28+
}
29+
finally
30+
{
31+
# Cleanup
32+
Clean-ResourceGroup $rgname
33+
}
34+
}

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,12 @@ public void TestVirtualNetworkUsage()
6060
{
6161
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkUsage");
6262
}
63+
64+
[Fact]
65+
[Trait(Category.AcceptanceType, Category.CheckIn)]
66+
public void TestVirtualNetworkSubnetServiceEndpoint()
67+
{
68+
NetworkResourcesController.NewInstance.RunPsTest("Test-VirtualNetworkSubnetServiceEndpoint");
69+
}
6370
}
6471
}

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkTests.ps1

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,47 @@ function Test-VirtualNetworkUsage
400400
Clean-ResourceGroup $rgname
401401
}
402402
}
403+
404+
<#
405+
.SYNOPSIS
406+
Tests checking Virtual Network Subnet Service Endpoint feature.
407+
#>
408+
function Test-VirtualNetworkSubnetServiceEndpoint
409+
{
410+
# Setup
411+
$rgname = Get-ResourceGroupName
412+
$vnetName = Get-ResourceName
413+
$subnetName = Get-ResourceName
414+
$rglocation = Get-ProviderLocation ResourceManagement
415+
$resourceTypeParent = "Microsoft.Network/virtualNetworks"
416+
$location = Get-ProviderLocation $resourceTypeParent
417+
$serviceEndpoint = "Microsoft.Storage"
418+
419+
try
420+
{
421+
# Create the resource group
422+
$resourceGroup = New-AzureRmResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" };
423+
424+
# Create the Virtual Network
425+
$subnet = New-AzureRmVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24 -ServiceEndpoint $serviceEndpoint;
426+
New-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -Subnet $subnet;
427+
$vnet = Get-AzureRmvirtualNetwork -Name $vnetName -ResourceGroupName $rgname;
428+
429+
Assert-NotNull $vnet;
430+
Assert-NotNull $vnet.Subnets;
431+
432+
$subnet = $vnet.Subnets[0];
433+
Assert-AreEqual $serviceEndpoint $subnet.serviceEndpoints[0].Service;
434+
435+
Set-AzureRmVirtualNetworkSubnetConfig -Name $subnetName -VirtualNetwork $vnet -AddressPrefix 10.0.1.0/24 -ServiceEndpoint $null;
436+
$vnet = Set-AzureRmVirtualNetwork -VirtualNetwork $vnet;
437+
$subnet = $vnet.Subnets[0];
438+
439+
Assert-Null $subnet.serviceEndpoints;
440+
}
441+
finally
442+
{
443+
# Cleanup
444+
Clean-ResourceGroup $rgname
445+
}
446+
}

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.AvailableEndpointServicesTests/TestAvailableEndpointServicesList.json

Lines changed: 117 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkSubnetServiceEndpoint.json

Lines changed: 1394 additions & 0 deletions
Large diffs are not rendered by default.

src/ResourceManager/Network/Commands.Network.Test/packages.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<package id="Microsoft.Azure.Insights" version="0.13.1-preview" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Compute" version="16.2.0" targetFramework="net452" />
11-
<package id="Microsoft.Azure.Management.Network" version="12.0.0-preview" targetFramework="net452" />
11+
<package id="Microsoft.Azure.Management.Network" version="13.1.0-preview" targetFramework="net452" />
1212
<package id="Microsoft.Azure.Management.Redis" version="3.1.1-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
1414
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
@@ -20,8 +20,8 @@
2020
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />
2121
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net45" />
2222
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
23-
<package id="Microsoft.Rest.ClientRuntime" version="2.3.8" targetFramework="net452" />
24-
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.7" targetFramework="net452" />
23+
<package id="Microsoft.Rest.ClientRuntime" version="2.3.9" targetFramework="net452" />
24+
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.9" targetFramework="net452" />
2525
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.5.2" targetFramework="net45" />
2626
<package id="Moq" version="4.2.1510.2205" targetFramework="net45" />
2727
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ResourceManager/Network/Commands.Network/Commands.Network.csproj

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,20 @@
5353
<HintPath>..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
5454
<Private>True</Private>
5555
</Reference>
56-
<Reference Include="Microsoft.Azure.Management.Network, Version=12.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
57-
<SpecificVersion>False</SpecificVersion>
58-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.12.0.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
56+
<Reference Include="Microsoft.Azure.Management.Network, Version=13.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
57+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.13.1.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
58+
<Private>True</Private>
59+
</Reference>
60+
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
61+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.9\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
62+
<Private>True</Private>
63+
</Reference>
64+
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
65+
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.9\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
66+
<Private>True</Private>
67+
</Reference>
68+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
69+
<HintPath>..\..\..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
5970
<Private>True</Private>
6071
</Reference>
6172
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
@@ -181,6 +192,7 @@
181192
<Compile Include="Common\NetworkClient.cs" />
182193
<Compile Include="Common\NetworkCloudException.cs" />
183194
<Compile Include="Common\NetworkResourceManagerProfile.cs" />
195+
<Compile Include="EndpointService\GetAzureRMAvailableEndpointServiceCommand.cs" />
184196
<Compile Include="ExpressRouteCircuit\Authorization\AddAzureExpressRouteCircuitAuthorizationCommand.cs" />
185197
<Compile Include="ExpressRouteCircuit\Authorization\AzureExpressRouteCircuitAuthorizationBase.cs" />
186198
<Compile Include="ExpressRouteCircuit\Authorization\GetAzureExpressRouteCircuitAuthorizationCommand.cs" />
@@ -213,6 +225,8 @@
213225
<Compile Include="Models\PSApplicationGatewayProbeHealthResponseMatch.cs" />
214226
<Compile Include="Models\PSApplicationGatewaySslPredefinedPolicy.cs" />
215227
<Compile Include="Models\PSApplicationGatewayAvailableSslOptions.cs" />
228+
<Compile Include="Models\PSEndpointServiceResult.cs" />
229+
<Compile Include="Models\PSServiceEndpoint.cs" />
216230
<Compile Include="Models\PSVirtualNetworkUsage.cs" />
217231
<Compile Include="Models\PSApplicationGatewayBackendHealth.cs" />
218232
<Compile Include="Models\PSApplicationGatewayBackendHealthHttpSettings.cs" />

src/ResourceManager/Network/Commands.Network/Common/NetworkResourceManagerProfile.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ public static void Initialize()
5353
cfg.CreateMap<CNM.PSSubnet, MNM.Subnet>();
5454
cfg.CreateMap<CNM.PSIPConfiguration, MNM.IPConfiguration>();
5555
cfg.CreateMap<CNM.PSResourceNavigationLink, MNM.ResourceNavigationLink>();
56+
cfg.CreateMap<CNM.PSServiceEndpoint, MNM.ServiceEndpointPropertiesFormat>();
5657

5758
// MNM to CNM
5859
cfg.CreateMap<MNM.DhcpOptions, CNM.PSDhcpOptions>();
5960
cfg.CreateMap<MNM.Subnet, CNM.PSSubnet>();
6061
cfg.CreateMap<MNM.IPConfiguration, CNM.PSIPConfiguration>();
6162
cfg.CreateMap<MNM.ResourceNavigationLink, CNM.PSResourceNavigationLink>();
63+
cfg.CreateMap<MNM.ServiceEndpointPropertiesFormat, CNM.PSServiceEndpoint>();
6264

6365
// TestPrivateIpAddressAvailability
6466
// CNM to MNM
@@ -67,6 +69,14 @@ public static void Initialize()
6769
// MNM to CNM
6870
cfg.CreateMap<MNM.IPAddressAvailabilityResult, CNM.PSIPAddressAvailabilityResult>();
6971

72+
// Avaliable endpoint services
73+
// CNM to MNM
74+
cfg.CreateMap<CNM.PSEndpointServiceResult, MNM.EndpointServiceResult>();
75+
76+
// MNM to CNM
77+
cfg.CreateMap<MNM.EndpointServiceResult, CNM.PSEndpointServiceResult>();
78+
79+
7080
// VirtualNetwork Peering
7181
cfg.CreateMap<CNM.PSVirtualNetworkPeering, MNM.VirtualNetworkPeering>();
7282

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
//
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
using Microsoft.Azure.Commands.Network.Models;
18+
using Microsoft.Azure.Management.Network;
19+
using Microsoft.Azure.Management.Network.Models;
20+
using System;
21+
using System.Collections;
22+
using System.Collections.Generic;
23+
using System.Linq;
24+
using System.Management.Automation;
25+
using AutoMapper;
26+
using CNM = Microsoft.Azure.Commands.Network.Models;
27+
28+
namespace Microsoft.Azure.Commands.Network.Automation
29+
{
30+
[Cmdlet(VerbsCommon.Get, "AzureRmVirtualNetworkAvailableEndpointService"), OutputType(typeof(List<PSEndpointServiceResult>))]
31+
public partial class GetAzureRMVirtualNetworkAvailableEndpointServiceCommand : NetworkBaseCmdlet
32+
{
33+
[Parameter(
34+
Mandatory = true,
35+
HelpMessage = "The location.",
36+
ValueFromPipelineByPropertyName = true)]
37+
[ValidateNotNullOrEmpty]
38+
public string Location { get; set; }
39+
40+
public override void Execute()
41+
{
42+
base.Execute();
43+
44+
var vAvailableEndpointServiceList = this.NetworkClient.NetworkManagementClient.AvailableEndpointServices.List(Location);
45+
List<PSEndpointServiceResult> psAvailableServiceEndpoints = new List<PSEndpointServiceResult>();
46+
foreach (var vAvailableEndpointService in vAvailableEndpointServiceList)
47+
{
48+
psAvailableServiceEndpoints.Add(Mapper.Map<CNM.PSEndpointServiceResult>(vAvailableEndpointService));
49+
}
50+
WriteObject(psAvailableServiceEndpoints, true);
51+
}
52+
}
53+
}

src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@
652652
<Label>RouteTable</Label>
653653
<PropertyName>RouteTableText</PropertyName>
654654
</ListItem>
655+
<ListItem>
656+
<Label>ServiceEndpoints</Label>
657+
<PropertyName>ServiceEndpointText</PropertyName>
658+
</ListItem>
655659
</ListItems>
656660
</ListEntry>
657661
</ListEntries>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace Microsoft.Azure.Commands.Network.Models
2+
{
3+
public class PSEndpointServiceResult
4+
{
5+
public string Name { get; set; }
6+
public string Id { get; set; }
7+
public string Type { get; set; }
8+
}
9+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Newtonsoft.Json;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace Microsoft.Azure.Commands.Network.Models
9+
{
10+
public class PSServiceEndpoint
11+
{
12+
[JsonProperty(Order = 1)]
13+
public string ProvisioningState { get; set; }
14+
15+
[JsonProperty(Order = 1)]
16+
public string Service { get; set; }
17+
18+
[JsonProperty(Order = 1)]
19+
public List<string> Locations { get; set; }
20+
}
21+
}

0 commit comments

Comments
 (0)