From eba1de636b4648e0e2a9ae8da7599c65728f1c8a Mon Sep 17 00:00:00 2001 From: William Ehrich Date: Wed, 9 Jun 2021 00:51:30 -0700 Subject: [PATCH] Add edge zone parameter to virtual network cmdlet (#15196) * Update virtual network cmdlet * Create PSExtendedLocation.cs * Unit test is working * Add session record * Fix help message and change formatting * Update test session record * Add catch block to test * Fix build error introduced during rebase * UT metadata * Run commands synchronously and upload new test session record * Fix static analysis issue Co-authored-by: Will Ehrich --- .../ScenarioTests/VirtualNetworkTests.cs | 9 + .../ScenarioTests/VirtualNetworkTests.ps1 | 40 +- .../TestVirtualNetworkEdgeZone.json | 1067 +++++++++++++++++ .../Network/Models/PSExtendedLocation.cs | 6 +- .../Network/Models/PSVirtualNetwork.cs | 10 +- src/Network/Network/Network.format.ps1xml | 4 + .../NewAzureVirtualNetworkCommand.cs | 21 +- 7 files changed, 1141 insertions(+), 16 deletions(-) create mode 100644 src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkEdgeZone.json diff --git a/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.cs b/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.cs index 98a30bead716..99e62de04db6 100644 --- a/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.cs +++ b/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.cs @@ -164,9 +164,18 @@ public void TestVirtualNetworkPeeringSyncCRUD() [Fact] [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Owner, NrpTeamAlias.sdnnrp)] public void TestVirtualNetworkInEdgeZone() { TestRunner.RunTestScript("Test-VirtualNetworkInEdgeZone"); } + + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + [Trait(Category.Owner, NrpTeamAlias.sdnnrp)] + public void TestVirtualNetworkEdgeZone() + { + TestRunner.RunTestScript("Test-VirtualNetworkEdgeZone"); + } } } diff --git a/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.ps1 b/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.ps1 index 742a1d46314e..3eabbbf79f7e 100644 --- a/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.ps1 +++ b/src/Network/Network.Test/ScenarioTests/VirtualNetworkTests.ps1 @@ -1496,6 +1496,44 @@ function Test-VirtualNetworkInEdgeZone finally { # Cleanup - Clean-ResourceGroup $ResourceGroup + Clean-ResourceGroup $ResourceGroupfunction Test-VirtualNetworkEdgeZone + } +} + +<# +.SYNOPSIS +Test for creating a new virtual network in an edge zone. Subscriptions need to be explicitly whitelisted for access to edge zones. +#> +function Test-VirtualNetworkEdgeZone +{ + # Setup + $rgname = Get-ResourceGroupName + $vnetName = Get-ResourceName + $subnetName = Get-ResourceName + $rglocation = "eastus2euap" + $resourceTypeParent = "Microsoft.Network/virtualNetworks" + $location = "eastus2euap" + + try + { + # Create the resource group + $resourceGroup = New-AzResourceGroup -Name $rgname -Location $rglocation -Tags @{ testtag = "testval" } + + # Create the Virtual Network + $subnet = New-AzVirtualNetworkSubnetConfig -Name $subnetName -AddressPrefix 10.0.1.0/24 + New-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname -Location $location -AddressPrefix 10.0.0.0/16 -DnsServer 8.8.8.8 -Subnet $subnet -EdgeZone "MicrosoftRRDCLab1" + $expected = Get-AzVirtualNetwork -Name $vnetName -ResourceGroupName $rgname + + Assert-AreEqual $expected.ExtendedLocation.Name "MicrosoftRRDCLab1" + Assert-AreEqual $expected.ExtendedLocation.Type "EdgeZone" + } + catch [Microsoft.Azure.Commands.Network.Common.NetworkCloudException] + { + Assert-NotNull { $_.Exception.Message -match 'Resource type .* does not support edge zone .* in location .* The supported edge zones are .*' } + } + finally + { + # Cleanup + Clean-ResourceGroup $rgname } } \ No newline at end of file diff --git a/src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkEdgeZone.json b/src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkEdgeZone.json new file mode 100644 index 000000000000..135ef3beb379 --- /dev/null +++ b/src/Network/Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkTests/TestVirtualNetworkEdgeZone.json @@ -0,0 +1,1067 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourcegroups/ps5186?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlZ3JvdXBzL3BzNTE4Nj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"eastus2euap\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8b7dedc9-9d48-44af-9a7f-d2249c2dd133" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "33" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "d872152d-c7d8-4628-bac2-38ec4ef5f20b" + ], + "x-ms-correlation-request-id": [ + "d872152d-c7d8-4628-bac2-38ec4ef5f20b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053645Z:d872152d-c7d8-4628-bac2-38ec4ef5f20b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:36:44 GMT" + ], + "Content-Length": [ + "170" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186\",\r\n \"name\": \"ps5186\",\r\n \"location\": \"eastus2euap\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlR3JvdXBzL3BzNTE4Ni9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL3BzODgyND9hcGktdmVyc2lvbj0yMDIxLTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb87da9a-aa89-49b1-810e-c00934a230c5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-failure-cause": [ + "gateway" + ], + "x-ms-request-id": [ + "100eb22d-f237-425a-804b-0ed20ff2ef90" + ], + "x-ms-correlation-request-id": [ + "100eb22d-f237-425a-804b-0ed20ff2ef90" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053646Z:100eb22d-f237-425a-804b-0ed20ff2ef90" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:36:45 GMT" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "218" + ] + }, + "ResponseBody": "{\r\n \"error\": {\r\n \"code\": \"ResourceNotFound\",\r\n \"message\": \"The Resource 'Microsoft.Network/virtualNetworks/ps8824' under resource group 'ps5186' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix\"\r\n }\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlR3JvdXBzL3BzNTE4Ni9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL3BzODgyND9hcGktdmVyc2lvbj0yMDIxLTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb87da9a-aa89-49b1-810e-c00934a230c5" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"1fd51762-4e59-4810-b2a5-3fdf61e07489\"" + ], + "x-ms-request-id": [ + "cd3970e5-0f42-4af1-adc4-4433236f023b" + ], + "x-ms-correlation-request-id": [ + "aa8652fa-49cd-4e9a-93b5-0cb4e6d5832e" + ], + "x-ms-arm-service-request-id": [ + "75c4bcbc-f940-4f25-9e91-09c6259a5d7d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053704Z:aa8652fa-49cd-4e9a-93b5-0cb4e6d5832e" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:03 GMT" + ], + "Content-Length": [ + "1409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps8824\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824\",\r\n \"etag\": \"W/\\\"1fd51762-4e59-4810-b2a5-3fdf61e07489\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n \"extendedLocation\": {\r\n \"type\": \"EdgeZone\",\r\n \"name\": \"MicrosoftRRDCLab1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a09141b0-6264-4de5-8e17-92d8046eb506\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": [\r\n \"8.8.8.8\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"ps6096\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824/subnets/ps6096\",\r\n \"etag\": \"W/\\\"1fd51762-4e59-4810-b2a5-3fdf61e07489\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlR3JvdXBzL3BzNTE4Ni9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL3BzODgyND9hcGktdmVyc2lvbj0yMDIxLTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb87da9a-aa89-49b1-810e-c00934a230c5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"1fd51762-4e59-4810-b2a5-3fdf61e07489\"" + ], + "x-ms-request-id": [ + "3fc49f49-7263-4ec8-ba3b-992229213685" + ], + "x-ms-correlation-request-id": [ + "72dc3a29-a0ae-4fec-a959-052cae2d4faf" + ], + "x-ms-arm-service-request-id": [ + "6063ccc3-0094-4f91-a631-fca7ce396dcd" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053704Z:72dc3a29-a0ae-4fec-a959-052cae2d4faf" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:04 GMT" + ], + "Content-Length": [ + "1409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps8824\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824\",\r\n \"etag\": \"W/\\\"1fd51762-4e59-4810-b2a5-3fdf61e07489\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n \"extendedLocation\": {\r\n \"type\": \"EdgeZone\",\r\n \"name\": \"MicrosoftRRDCLab1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a09141b0-6264-4de5-8e17-92d8046eb506\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": [\r\n \"8.8.8.8\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"ps6096\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824/subnets/ps6096\",\r\n \"etag\": \"W/\\\"1fd51762-4e59-4810-b2a5-3fdf61e07489\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlR3JvdXBzL3BzNTE4Ni9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL3BzODgyND9hcGktdmVyc2lvbj0yMDIxLTAyLTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cfabbfb0-d0ad-4961-9173-f8130e8795b4" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "ETag": [ + "W/\"1fd51762-4e59-4810-b2a5-3fdf61e07489\"" + ], + "x-ms-request-id": [ + "07238b05-68e1-4d56-a3d5-aada2d28fbe1" + ], + "x-ms-correlation-request-id": [ + "c90892e1-f1ed-4fe8-8961-89d6b59e2900" + ], + "x-ms-arm-service-request-id": [ + "e7d89f5d-2acd-4f5f-aa7c-cfc3aa48bced" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053704Z:c90892e1-f1ed-4fe8-8961-89d6b59e2900" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:04 GMT" + ], + "Content-Length": [ + "1409" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps8824\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824\",\r\n \"etag\": \"W/\\\"1fd51762-4e59-4810-b2a5-3fdf61e07489\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n \"extendedLocation\": {\r\n \"type\": \"EdgeZone\",\r\n \"name\": \"MicrosoftRRDCLab1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a09141b0-6264-4de5-8e17-92d8046eb506\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": [\r\n \"8.8.8.8\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"ps6096\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824/subnets/ps6096\",\r\n \"etag\": \"W/\\\"1fd51762-4e59-4810-b2a5-3fdf61e07489\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlR3JvdXBzL3BzNTE4Ni9wcm92aWRlcnMvTWljcm9zb2Z0Lk5ldHdvcmsvdmlydHVhbE5ldHdvcmtzL3BzODgyND9hcGktdmVyc2lvbj0yMDIxLTAyLTAx", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"extendedLocation\": {\r\n \"name\": \"MicrosoftRRDCLab1\",\r\n \"type\": \"EdgeZone\"\r\n },\r\n \"properties\": {\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": [\r\n \"8.8.8.8\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"properties\": {\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"addressPrefixes\": [],\r\n \"serviceEndpoints\": [],\r\n \"serviceEndpointPolicies\": [],\r\n \"ipAllocations\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\",\r\n \"applicationGatewayIpConfigurations\": []\r\n },\r\n \"name\": \"ps6096\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false,\r\n \"ipAllocations\": []\r\n },\r\n \"location\": \"eastus2euap\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb87da9a-aa89-49b1-810e-c00934a230c5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "905" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "3" + ], + "x-ms-request-id": [ + "7f7376a6-79ad-4ab7-9c75-7d61f419b247" + ], + "Azure-AsyncOperation": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/providers/Microsoft.Network/locations/eastus2euap/operations/7f7376a6-79ad-4ab7-9c75-7d61f419b247?api-version=2021-02-01" + ], + "x-ms-correlation-request-id": [ + "15969a6c-13b7-46ba-951a-7f78f423ed27" + ], + "Azure-AsyncNotification": [ + "Enabled" + ], + "x-ms-arm-service-request-id": [ + "d0e3d369-3aa8-4718-8ee0-f795dc1d795e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053650Z:15969a6c-13b7-46ba-951a-7f78f423ed27" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:36:50 GMT" + ], + "Content-Length": [ + "1407" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"ps8824\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824\",\r\n \"etag\": \"W/\\\"4d5b5321-dae5-4ec2-8aa5-8aa503d419c3\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus2euap\",\r\n \"extendedLocation\": {\r\n \"type\": \"EdgeZone\",\r\n \"name\": \"MicrosoftRRDCLab1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"a09141b0-6264-4de5-8e17-92d8046eb506\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"dhcpOptions\": {\r\n \"dnsServers\": [\r\n \"8.8.8.8\"\r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\": \"ps6096\",\r\n \"id\": \"/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourceGroups/ps5186/providers/Microsoft.Network/virtualNetworks/ps8824/subnets/ps6096\",\r\n \"etag\": \"W/\\\"4d5b5321-dae5-4ec2-8aa5-8aa503d419c3\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"serviceEndpoints\": [],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/providers/Microsoft.Network/locations/eastus2euap/operations/7f7376a6-79ad-4ab7-9c75-7d61f419b247?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvZWFzdHVzMmV1YXAvb3BlcmF0aW9ucy83ZjczNzZhNi03OWFkLTRhYjctOWM3NS03ZDYxZjQxOWIyNDc/YXBpLXZlcnNpb249MjAyMS0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb87da9a-aa89-49b1-810e-c00934a230c5" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Retry-After": [ + "10" + ], + "x-ms-request-id": [ + "f8a805e0-f9c3-4ad3-9f45-a502b1afe227" + ], + "x-ms-correlation-request-id": [ + "0a052af9-f5d7-4a9e-b8ac-1c761418f4f1" + ], + "x-ms-arm-service-request-id": [ + "6de0c327-b236-47c4-bffa-181af069432c" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053654Z:0a052af9-f5d7-4a9e-b8ac-1c761418f4f1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:36:53 GMT" + ], + "Content-Length": [ + "30" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"InProgress\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/providers/Microsoft.Network/locations/eastus2euap/operations/7f7376a6-79ad-4ab7-9c75-7d61f419b247?api-version=2021-02-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Byb3ZpZGVycy9NaWNyb3NvZnQuTmV0d29yay9sb2NhdGlvbnMvZWFzdHVzMmV1YXAvb3BlcmF0aW9ucy83ZjczNzZhNi03OWFkLTRhYjctOWM3NS03ZDYxZjQxOWIyNDc/YXBpLXZlcnNpb249MjAyMS0wMi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb87da9a-aa89-49b1-810e-c00934a230c5" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Network.NetworkManagementClient/20.5.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "8fad0c00-a6b0-4e09-851d-d7ab05b8940e" + ], + "x-ms-correlation-request-id": [ + "ed3a3040-eef2-44f2-b575-2628a2d58c30" + ], + "x-ms-arm-service-request-id": [ + "29747de7-650c-40e1-8bbd-dcdae0ed8319" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0", + "Microsoft-HTTPAPI/2.0" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053704Z:ed3a3040-eef2-44f2-b575-2628a2d58c30" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:03 GMT" + ], + "Content-Length": [ + "29" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"status\": \"Succeeded\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/resourcegroups/ps5186?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L3Jlc291cmNlZ3JvdXBzL3BzNTE4Nj9hcGktdmVyc2lvbj0yMDE2LTA5LTAx", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "267f7c7e-fe64-4690-b719-fb8106d35b2f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "026d99ce-a693-41b2-852f-bcdf5ab3474e" + ], + "x-ms-correlation-request-id": [ + "026d99ce-a693-41b2-852f-bcdf5ab3474e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053705Z:026d99ce-a693-41b2-852f-bcdf5ab3474e" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:05 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3657b071-cbbe-43c5-9945-64b18b29f646" + ], + "x-ms-correlation-request-id": [ + "3657b071-cbbe-43c5-9945-64b18b29f646" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053721Z:3657b071-cbbe-43c5-9945-64b18b29f646" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:20 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "8d8d70bb-b3f3-4799-951f-a1196aa81d30" + ], + "x-ms-correlation-request-id": [ + "8d8d70bb-b3f3-4799-951f-a1196aa81d30" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053736Z:8d8d70bb-b3f3-4799-951f-a1196aa81d30" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:35 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "e26cb81b-aa5b-4e6f-8e18-94654070805f" + ], + "x-ms-correlation-request-id": [ + "e26cb81b-aa5b-4e6f-8e18-94654070805f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053751Z:e26cb81b-aa5b-4e6f-8e18-94654070805f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:37:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "9400e56c-b4fd-414a-b027-1348f5e46750" + ], + "x-ms-correlation-request-id": [ + "9400e56c-b4fd-414a-b027-1348f5e46750" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053806Z:9400e56c-b4fd-414a-b027-1348f5e46750" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:38:06 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "b5427efe-0224-47f8-9d22-c1004be61865" + ], + "x-ms-correlation-request-id": [ + "b5427efe-0224-47f8-9d22-c1004be61865" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053821Z:b5427efe-0224-47f8-9d22-c1004be61865" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:38:21 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "97dcad12-1892-452c-bd08-64c17d15d37d" + ], + "x-ms-correlation-request-id": [ + "97dcad12-1892-452c-bd08-64c17d15d37d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053837Z:97dcad12-1892-452c-bd08-64c17d15d37d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:38:36 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11993" + ], + "x-ms-request-id": [ + "6a058e66-53bd-4ad6-8e9a-07562b837181" + ], + "x-ms-correlation-request-id": [ + "6a058e66-53bd-4ad6-8e9a-07562b837181" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053852Z:6a058e66-53bd-4ad6-8e9a-07562b837181" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:38:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/baffff89-2c76-424a-af4c-43b7518a3cb8/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1QUzUxODYtRUFTVFVTMkVVQVAiLCJqb2JMb2NhdGlvbiI6ImVhc3R1czJldWFwIn0?api-version=2016-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFmZmZmODktMmM3Ni00MjRhLWFmNGMtNDNiNzUxOGEzY2I4L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFRVXpVeE9EWXRSVUZUVkZWVE1rVlZRVkFpTENKcWIySk1iMk5oZEdsdmJpSTZJbVZoYzNSMWN6SmxkV0Z3SW4wP2FwaS12ZXJzaW9uPTIwMTYtMDktMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.30015.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.19043.", + "Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient/1.3.34" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11992" + ], + "x-ms-request-id": [ + "6c89fb08-0ef5-4c7b-9936-12716828ff24" + ], + "x-ms-correlation-request-id": [ + "6c89fb08-0ef5-4c7b-9936-12716828ff24" + ], + "x-ms-routing-request-id": [ + "WESTUS:20210609T053852Z:6c89fb08-0ef5-4c7b-9936-12716828ff24" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 09 Jun 2021 05:38:51 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "Test-VirtualNetworkEdgeZone": [ + "ps5186", + "ps8824", + "ps6096" + ] + }, + "Variables": { + "SubscriptionId": "baffff89-2c76-424a-af4c-43b7518a3cb8" + } +} \ No newline at end of file diff --git a/src/Network/Network/Models/PSExtendedLocation.cs b/src/Network/Network/Models/PSExtendedLocation.cs index c9a3dd67c37b..4c97fad46438 100644 --- a/src/Network/Network/Models/PSExtendedLocation.cs +++ b/src/Network/Network/Models/PSExtendedLocation.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) Microsoft. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); @@ -24,10 +24,10 @@ public PSExtendedLocation() public PSExtendedLocation(string EdgeZone) { - var extendedLocation = new ExtendedLocation(EdgeZone); + var extendedLocation = new ExtendedLocation(EdgeZone, ExtendedLocationTypes.EdgeZone); this.Name = extendedLocation.Name; - this.Type = ExtendedLocationTypes.EdgeZone; + this.Type = extendedLocation.Type; } public string Name { get; set; } diff --git a/src/Network/Network/Models/PSVirtualNetwork.cs b/src/Network/Network/Models/PSVirtualNetwork.cs index 2c7aff0bbbb9..78a3b6f06e40 100644 --- a/src/Network/Network/Models/PSVirtualNetwork.cs +++ b/src/Network/Network/Models/PSVirtualNetwork.cs @@ -23,8 +23,6 @@ namespace Microsoft.Azure.Commands.Network.Models public class PSVirtualNetwork : PSTopLevelResource, IResourceReference, IVirtualNetwork { - public PSExtendedLocation ExtendedLocation { get; set; } - public PSAddressSpace AddressSpace { get; set; } public PSDhcpOptions DhcpOptions { get; set; } @@ -47,6 +45,8 @@ public class PSVirtualNetwork : PSTopLevelResource, IResourceReference, IVirtual public List IpAllocations { get; set; } + public PSExtendedLocation ExtendedLocation { get; set; } + [JsonIgnore] public string AddressSpaceText { @@ -100,5 +100,11 @@ public string IpAllocationsText { get { return JsonConvert.SerializeObject(IpAllocations, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } } + + [JsonIgnore] + public string ExtendedLocationText + { + get { return JsonConvert.SerializeObject(ExtendedLocation, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); } + } } } diff --git a/src/Network/Network/Network.format.ps1xml b/src/Network/Network/Network.format.ps1xml index 58e27f147582..f0337a7097af 100644 --- a/src/Network/Network/Network.format.ps1xml +++ b/src/Network/Network/Network.format.ps1xml @@ -139,6 +139,10 @@ DdosProtectionPlanText + + + ExtendedLocationText + diff --git a/src/Network/Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs b/src/Network/Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs index 36cde90635d4..7fb9148bdb41 100644 --- a/src/Network/Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs +++ b/src/Network/Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs @@ -53,11 +53,6 @@ public class NewAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet [ValidateNotNullOrEmpty] public virtual string Location { get; set; } - [Parameter( - Mandatory = false, - ValueFromPipelineByPropertyName = true)] - public string EdgeZone { get; set; } - [Parameter( Mandatory = true, ValueFromPipelineByPropertyName = true, @@ -112,6 +107,12 @@ public class NewAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet HelpMessage = "IpAllocation")] public PSIpAllocation[] IpAllocation { get; set; } + [Parameter( + Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "The edge zone of the virtual network.")] + public string EdgeZone { get; set; } + [Parameter( Mandatory = false, HelpMessage = "Do not ask for confirmation if you want to override a resource")] @@ -147,11 +148,6 @@ private PSVirtualNetwork CreateVirtualNetwork() AddressSpace = new PSAddressSpace {AddressPrefixes = AddressPrefix?.ToList()} }; - if (this.EdgeZone != null) - { - vnet.ExtendedLocation = new PSExtendedLocation(EdgeZone); - } - if (DnsServer != null) { vnet.DhcpOptions = new PSDhcpOptions {DnsServers = DnsServer?.ToList()}; @@ -175,6 +171,11 @@ private PSVirtualNetwork CreateVirtualNetwork() vnet.BgpCommunities = new PSVirtualNetworkBgpCommunities {VirtualNetworkCommunity = this.BgpCommunity}; } + if (!string.IsNullOrEmpty(this.EdgeZone)) + { + vnet.ExtendedLocation = new PSExtendedLocation(this.EdgeZone); + } + // Map to the sdk object var vnetModel = NetworkResourceManagerProfile.Mapper.Map(vnet); vnetModel.Tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true);