From 95c9603bc841fdb725f34d835595fd1d19de2df4 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Thu, 4 Mar 2021 16:01:54 +0800 Subject: [PATCH 01/13] Rename TryGetValue to TryGet/TryGetAsync --- .../src/ContainerBase.cs | 76 ++++++++++++++++++- .../tests/ContainerBaseTest.cs | 27 +++++++ 2 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index 16cc90042c8a..e5e26d160411 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -4,6 +4,8 @@ using Azure.Core; using System; using System.Globalization; +using System.Threading; +using System.Threading.Tasks; namespace Azure.ResourceManager.Core { @@ -37,17 +39,39 @@ protected ContainerBase(ResourceOperationsBase parent) } /// - /// Gets the parent resource of this resource + /// Gets the parent resource of this resource. /// protected ResourceOperationsBase Parent { get; } /// - /// Returns the resource from Azure if it exists + /// Returns the resource from Azure if it exists. /// /// The name of the resource you want to get. /// The resource if it existed, null otherwise. /// Whether or not the resource existed. - public virtual bool TryGetValue(string resourceName, out ArmResponse resource) + public virtual bool TryGet(string resourceName, out TOperations resource) + { + var op = GetOperation(resourceName); + + try + { + resource = op.Get().Value; + return true; + } + catch + { + resource = null; + return false; + } + } + + /// + /// Returns the resource from Azure if it exists. + /// + /// The name of the resource you want to get. + /// The resource if it existed, null otherwise. + /// Whether or not the resource existed. + public virtual bool TryGet(string resourceName, out ArmResponse resource) { var op = GetOperation(resourceName); @@ -63,6 +87,50 @@ public virtual bool TryGetValue(string resourceName, out ArmResponse + /// Returns the resource from Azure if it exists. + /// + /// The name of the resource you want to get. + /// The resource if it existed, null otherwise. + /// A token to allow the caller to cancel the call to the service. + /// The default value is . + /// Whether or not the resource existed. + public async virtual Task TryGetAsync(string resourceName, TOperations resource, CancellationToken cancellationToken = default) + { + var op = GetOperation(resourceName); + + try + { + return (await op.GetAsync(cancellationToken).ConfigureAwait(false)).Value; + } + catch + { + return null; + } + } + + /// + /// Returns the resource from Azure if it exists. + /// + /// The name of the resource you want to get. + /// The resource if it existed, null otherwise. + /// A token to allow the caller to cancel the call to the service. + /// The default value is . + /// Whether or not the resource existed. + public async virtual Task> TryGetAsync(string resourceName, ArmResponse resource, CancellationToken cancellationToken = default) + { + var op = GetOperation(resourceName); + + try + { + return await op.GetAsync(cancellationToken).ConfigureAwait(false); + } + catch + { + return null; + } + } + /// /// Determines whether or not the azure resource exists in this container /// @@ -71,7 +139,7 @@ public virtual bool TryGetValue(string resourceName, out ArmResponse output; - return TryGetValue(resourceName, out output); + return TryGet(resourceName, out output); } /// diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs new file mode 100644 index 000000000000..8aa752ef075d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using Azure.ResourceManager.Core; +using Azure.ResourceManager.Core.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ContainerBaseTest + { + [TestCase] + public void TryGetTest(bool expected, string resourceName) + { + //ArmResponse output; + //Assert.AreEqual(expected, TryGet(resourceName, out output)); + Assert.Ignore(); + } + + [TestCase] + public void TryGetAsyncTest(bool expected, string resourceName) + { + //ArmResponse output = null; + //Assert.AreEqual(output, await TryGetAsync(resourceName, output)); + Assert.Ignore(); + } + } +} From 70dc734289f4e3c3c6cf79cad88196747b0502d7 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 5 Mar 2021 14:59:35 +0800 Subject: [PATCH 02/13] Update ContainerBase.cs --- .../src/ContainerBase.cs | 47 +------------------ 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index e5e26d160411..b0ed9423d741 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -69,33 +69,10 @@ public virtual bool TryGet(string resourceName, out TOperations resource) /// Returns the resource from Azure if it exists. /// /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. - /// Whether or not the resource existed. - public virtual bool TryGet(string resourceName, out ArmResponse resource) - { - var op = GetOperation(resourceName); - - try - { - resource = op.Get(); - return true; - } - catch - { - resource = null; - return false; - } - } - - /// - /// Returns the resource from Azure if it exists. - /// - /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. /// A token to allow the caller to cancel the call to the service. /// The default value is . /// Whether or not the resource existed. - public async virtual Task TryGetAsync(string resourceName, TOperations resource, CancellationToken cancellationToken = default) + public async virtual Task TryGetAsync(string resourceName, CancellationToken cancellationToken = default) { var op = GetOperation(resourceName); @@ -109,28 +86,6 @@ public async virtual Task TryGetAsync(string resourceName, TOperati } } - /// - /// Returns the resource from Azure if it exists. - /// - /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// Whether or not the resource existed. - public async virtual Task> TryGetAsync(string resourceName, ArmResponse resource, CancellationToken cancellationToken = default) - { - var op = GetOperation(resourceName); - - try - { - return await op.GetAsync(cancellationToken).ConfigureAwait(false); - } - catch - { - return null; - } - } - /// /// Determines whether or not the azure resource exists in this container /// From b783e61926dd8478d5a8131fcbee902781cb76af Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 5 Mar 2021 15:01:45 +0800 Subject: [PATCH 03/13] Update ContainerBase.cs --- .../Azure.ResourceManager.Core/src/ContainerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index b0ed9423d741..700bbbb26851 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -93,7 +93,7 @@ public async virtual Task TryGetAsync(string resourceName, Cancella /// Whether or not the resource existed. public virtual bool DoesExist(string resourceName) { - ArmResponse output; + TOperations output; return TryGet(resourceName, out output); } From 2c7b10bc4466886a43afabfbd17e1ea4a6ae110f Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 14:47:43 +0800 Subject: [PATCH 04/13] Update TryGet method and test class --- .../src/ContainerBase.cs | 14 ++---- .../tests/ContainerBaseTest.cs | 48 +++++++++++++++---- 2 files changed, 45 insertions(+), 17 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index 700bbbb26851..c9c104eff063 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -47,21 +47,18 @@ protected ContainerBase(ResourceOperationsBase parent) /// Returns the resource from Azure if it exists. /// /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. /// Whether or not the resource existed. - public virtual bool TryGet(string resourceName, out TOperations resource) + public virtual TOperations TryGet(string resourceName) { var op = GetOperation(resourceName); try { - resource = op.Get().Value; - return true; + return op.Get().Value; } - catch + catch (RequestFailedException e) when (e.Status == 404) { - resource = null; - return false; + return null; } } @@ -93,8 +90,7 @@ public async virtual Task TryGetAsync(string resourceName, Cancella /// Whether or not the resource existed. public virtual bool DoesExist(string resourceName) { - TOperations output; - return TryGet(resourceName, out output); + return TryGet(resourceName) == null ? false : true; } /// diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs index 8aa752ef075d..94dd2d9ac09e 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs @@ -1,5 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; using Azure.ResourceManager.Core; using Azure.ResourceManager.Core.Resources; using NUnit.Framework; @@ -8,20 +12,48 @@ namespace Azure.ResourceManager.Core.Tests { public class ContainerBaseTest { + private ResourceGroupContainer _container; + private ResourceGroup _resourceGroup; + private readonly string _rgName = $"{Environment.UserName}-rg-{Environment.TickCount}"; + + [OneTimeSetUp] + public void GlobalSetUp() + { + _container = new AzureResourceManagerClient().DefaultSubscription.GetResourceGroupContainer(); + _resourceGroup = _container.Construct(LocationData.WestUS2).CreateOrUpdate(_rgName); + } + + [OneTimeTearDown] + public void GlobalTearDown() + { + _resourceGroup.StartDelete(); + } + + [TestCase] + public void TryGetTest() + { + ResourceGroup result = _container.TryGet(_rgName); + Assert.NotNull(result); + Assert.IsTrue(result.Data.Name == _rgName); + result = _container.TryGet("FakeName"+ new Random().Next(1,100)); + Assert.IsNull(result); + } + [TestCase] - public void TryGetTest(bool expected, string resourceName) + public async Task TryGetAsyncTest() { - //ArmResponse output; - //Assert.AreEqual(expected, TryGet(resourceName, out output)); - Assert.Ignore(); + ResourceGroup result = await _container.TryGetAsync(_rgName); + Assert.NotNull(result); + Assert.IsTrue(result.Data.Name == _rgName); + result = await _container.TryGetAsync("FakeName" + new Random().Next(1, 100)); + Assert.IsNull(result); } [TestCase] - public void TryGetAsyncTest(bool expected, string resourceName) + public void DoesExistTest() { - //ArmResponse output = null; - //Assert.AreEqual(output, await TryGetAsync(resourceName, output)); - Assert.Ignore(); + Assert.IsTrue(_container.DoesExist(_rgName)); + Assert.IsFalse(_container.DoesExist("FakeName" + new Random().Next(1, 100))); } } } From f168d920c0561ceb3b2ac606a134f0f24540b556 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 15:08:03 +0800 Subject: [PATCH 05/13] Update CheckResourceExists.cs --- .../src/Scenarios/CheckResourceExists.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs index c5988fe7c6eb..c6e85f37486e 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs @@ -24,13 +24,11 @@ public override void Execute() throw new Exception($"The resource group {Context.RgName} should have existed."); Console.WriteLine($"Using try get value to retrieve {Context.RgName}"); - ArmResponse rgOutput; - if(!rgContainer.TryGetValue(Context.RgName, out rgOutput)) + ResourceGroup rgOutput = rgContainer.TryGet(Context.RgName); + if(rgOutput == null) throw new Exception($"The resource group {Context.RgName} should have existed."); - var rg = rgOutput.Value; - - var asetContainer = rg.GetAvailabilitySetContainer(); + var asetContainer = rgOutput.GetAvailabilitySetContainer(); var asetName = Context.VmName + "_aSet"; Console.WriteLine($"Making sure {asetName} doesn't exist yet."); @@ -45,8 +43,8 @@ public override void Execute() throw new Exception($"The availability set {asetName} should have existed."); Console.WriteLine("Using try get value to retrieve the rg"); - ArmResponse asetOutput; - if (!asetContainer.TryGetValue(asetName, out asetOutput)) + AvailabilitySet asetOutput = asetContainer.TryGet(asetName); + if (asetOutput == null) throw new Exception($"The availability set {asetName} should have existed."); From 4dd7fe947c6249c930ba6b98e4be2271983143ac Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Thu, 4 Mar 2021 16:01:54 +0800 Subject: [PATCH 06/13] Rename TryGetValue to TryGet/TryGetAsync --- .../src/ContainerBase.cs | 76 ++++++++++++++++++- .../tests/ContainerBaseTest.cs | 27 +++++++ 2 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index 16cc90042c8a..e5e26d160411 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -4,6 +4,8 @@ using Azure.Core; using System; using System.Globalization; +using System.Threading; +using System.Threading.Tasks; namespace Azure.ResourceManager.Core { @@ -37,17 +39,39 @@ protected ContainerBase(ResourceOperationsBase parent) } /// - /// Gets the parent resource of this resource + /// Gets the parent resource of this resource. /// protected ResourceOperationsBase Parent { get; } /// - /// Returns the resource from Azure if it exists + /// Returns the resource from Azure if it exists. /// /// The name of the resource you want to get. /// The resource if it existed, null otherwise. /// Whether or not the resource existed. - public virtual bool TryGetValue(string resourceName, out ArmResponse resource) + public virtual bool TryGet(string resourceName, out TOperations resource) + { + var op = GetOperation(resourceName); + + try + { + resource = op.Get().Value; + return true; + } + catch + { + resource = null; + return false; + } + } + + /// + /// Returns the resource from Azure if it exists. + /// + /// The name of the resource you want to get. + /// The resource if it existed, null otherwise. + /// Whether or not the resource existed. + public virtual bool TryGet(string resourceName, out ArmResponse resource) { var op = GetOperation(resourceName); @@ -63,6 +87,50 @@ public virtual bool TryGetValue(string resourceName, out ArmResponse + /// Returns the resource from Azure if it exists. + /// + /// The name of the resource you want to get. + /// The resource if it existed, null otherwise. + /// A token to allow the caller to cancel the call to the service. + /// The default value is . + /// Whether or not the resource existed. + public async virtual Task TryGetAsync(string resourceName, TOperations resource, CancellationToken cancellationToken = default) + { + var op = GetOperation(resourceName); + + try + { + return (await op.GetAsync(cancellationToken).ConfigureAwait(false)).Value; + } + catch + { + return null; + } + } + + /// + /// Returns the resource from Azure if it exists. + /// + /// The name of the resource you want to get. + /// The resource if it existed, null otherwise. + /// A token to allow the caller to cancel the call to the service. + /// The default value is . + /// Whether or not the resource existed. + public async virtual Task> TryGetAsync(string resourceName, ArmResponse resource, CancellationToken cancellationToken = default) + { + var op = GetOperation(resourceName); + + try + { + return await op.GetAsync(cancellationToken).ConfigureAwait(false); + } + catch + { + return null; + } + } + /// /// Determines whether or not the azure resource exists in this container /// @@ -71,7 +139,7 @@ public virtual bool TryGetValue(string resourceName, out ArmResponse output; - return TryGetValue(resourceName, out output); + return TryGet(resourceName, out output); } /// diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs new file mode 100644 index 000000000000..8aa752ef075d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +using Azure.ResourceManager.Core; +using Azure.ResourceManager.Core.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ContainerBaseTest + { + [TestCase] + public void TryGetTest(bool expected, string resourceName) + { + //ArmResponse output; + //Assert.AreEqual(expected, TryGet(resourceName, out output)); + Assert.Ignore(); + } + + [TestCase] + public void TryGetAsyncTest(bool expected, string resourceName) + { + //ArmResponse output = null; + //Assert.AreEqual(output, await TryGetAsync(resourceName, output)); + Assert.Ignore(); + } + } +} From 083678bc0ac83e394f349114b0985f2e5c20f8a3 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 5 Mar 2021 14:59:35 +0800 Subject: [PATCH 07/13] Update ContainerBase.cs --- .../src/ContainerBase.cs | 47 +------------------ 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index e5e26d160411..b0ed9423d741 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -69,33 +69,10 @@ public virtual bool TryGet(string resourceName, out TOperations resource) /// Returns the resource from Azure if it exists. /// /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. - /// Whether or not the resource existed. - public virtual bool TryGet(string resourceName, out ArmResponse resource) - { - var op = GetOperation(resourceName); - - try - { - resource = op.Get(); - return true; - } - catch - { - resource = null; - return false; - } - } - - /// - /// Returns the resource from Azure if it exists. - /// - /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. /// A token to allow the caller to cancel the call to the service. /// The default value is . /// Whether or not the resource existed. - public async virtual Task TryGetAsync(string resourceName, TOperations resource, CancellationToken cancellationToken = default) + public async virtual Task TryGetAsync(string resourceName, CancellationToken cancellationToken = default) { var op = GetOperation(resourceName); @@ -109,28 +86,6 @@ public async virtual Task TryGetAsync(string resourceName, TOperati } } - /// - /// Returns the resource from Azure if it exists. - /// - /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// Whether or not the resource existed. - public async virtual Task> TryGetAsync(string resourceName, ArmResponse resource, CancellationToken cancellationToken = default) - { - var op = GetOperation(resourceName); - - try - { - return await op.GetAsync(cancellationToken).ConfigureAwait(false); - } - catch - { - return null; - } - } - /// /// Determines whether or not the azure resource exists in this container /// From cd44e5b873117d3bc197c6ec376c132ba253782e Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 5 Mar 2021 15:01:45 +0800 Subject: [PATCH 08/13] Update ContainerBase.cs --- .../Azure.ResourceManager.Core/src/ContainerBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index b0ed9423d741..700bbbb26851 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -93,7 +93,7 @@ public async virtual Task TryGetAsync(string resourceName, Cancella /// Whether or not the resource existed. public virtual bool DoesExist(string resourceName) { - ArmResponse output; + TOperations output; return TryGet(resourceName, out output); } From 958724f244260cbfeb21b68c1e183edbd2bbc01e Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 14:47:43 +0800 Subject: [PATCH 09/13] Update TryGet method and test class --- .../src/ContainerBase.cs | 14 ++---- .../tests/ContainerBaseTest.cs | 48 +++++++++++++++---- 2 files changed, 45 insertions(+), 17 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs index 700bbbb26851..c9c104eff063 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ContainerBase.cs @@ -47,21 +47,18 @@ protected ContainerBase(ResourceOperationsBase parent) /// Returns the resource from Azure if it exists. /// /// The name of the resource you want to get. - /// The resource if it existed, null otherwise. /// Whether or not the resource existed. - public virtual bool TryGet(string resourceName, out TOperations resource) + public virtual TOperations TryGet(string resourceName) { var op = GetOperation(resourceName); try { - resource = op.Get().Value; - return true; + return op.Get().Value; } - catch + catch (RequestFailedException e) when (e.Status == 404) { - resource = null; - return false; + return null; } } @@ -93,8 +90,7 @@ public async virtual Task TryGetAsync(string resourceName, Cancella /// Whether or not the resource existed. public virtual bool DoesExist(string resourceName) { - TOperations output; - return TryGet(resourceName, out output); + return TryGet(resourceName) == null ? false : true; } /// diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs index 8aa752ef075d..94dd2d9ac09e 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs @@ -1,5 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; using Azure.ResourceManager.Core; using Azure.ResourceManager.Core.Resources; using NUnit.Framework; @@ -8,20 +12,48 @@ namespace Azure.ResourceManager.Core.Tests { public class ContainerBaseTest { + private ResourceGroupContainer _container; + private ResourceGroup _resourceGroup; + private readonly string _rgName = $"{Environment.UserName}-rg-{Environment.TickCount}"; + + [OneTimeSetUp] + public void GlobalSetUp() + { + _container = new AzureResourceManagerClient().DefaultSubscription.GetResourceGroupContainer(); + _resourceGroup = _container.Construct(LocationData.WestUS2).CreateOrUpdate(_rgName); + } + + [OneTimeTearDown] + public void GlobalTearDown() + { + _resourceGroup.StartDelete(); + } + + [TestCase] + public void TryGetTest() + { + ResourceGroup result = _container.TryGet(_rgName); + Assert.NotNull(result); + Assert.IsTrue(result.Data.Name == _rgName); + result = _container.TryGet("FakeName"+ new Random().Next(1,100)); + Assert.IsNull(result); + } + [TestCase] - public void TryGetTest(bool expected, string resourceName) + public async Task TryGetAsyncTest() { - //ArmResponse output; - //Assert.AreEqual(expected, TryGet(resourceName, out output)); - Assert.Ignore(); + ResourceGroup result = await _container.TryGetAsync(_rgName); + Assert.NotNull(result); + Assert.IsTrue(result.Data.Name == _rgName); + result = await _container.TryGetAsync("FakeName" + new Random().Next(1, 100)); + Assert.IsNull(result); } [TestCase] - public void TryGetAsyncTest(bool expected, string resourceName) + public void DoesExistTest() { - //ArmResponse output = null; - //Assert.AreEqual(output, await TryGetAsync(resourceName, output)); - Assert.Ignore(); + Assert.IsTrue(_container.DoesExist(_rgName)); + Assert.IsFalse(_container.DoesExist("FakeName" + new Random().Next(1, 100))); } } } From ef536b26683ad3a749de77b8bd613b251c2f007f Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 15:08:03 +0800 Subject: [PATCH 10/13] Update CheckResourceExists.cs --- .../src/Scenarios/CheckResourceExists.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs index d4e228aea34a..a665aa668a18 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/CheckResourceExists.cs @@ -25,13 +25,11 @@ public override void Execute() throw new Exception($"The resource group {Context.RgName} should have existed."); Console.WriteLine($"Using try get value to retrieve {Context.RgName}"); - ArmResponse rgOutput; - if(!rgContainer.TryGetValue(Context.RgName, out rgOutput)) + ResourceGroup rgOutput = rgContainer.TryGet(Context.RgName); + if(rgOutput == null) throw new Exception($"The resource group {Context.RgName} should have existed."); - var rg = rgOutput.Value; - - var asetContainer = rg.GetAvailabilitySetContainer(); + var asetContainer = rgOutput.GetAvailabilitySetContainer(); var asetName = Context.VmName + "_aSet"; Console.WriteLine($"Making sure {asetName} doesn't exist yet."); @@ -46,8 +44,8 @@ public override void Execute() throw new Exception($"The availability set {asetName} should have existed."); Console.WriteLine("Using try get value to retrieve the rg"); - ArmResponse asetOutput; - if (!asetContainer.TryGetValue(asetName, out asetOutput)) + AvailabilitySet asetOutput = asetContainer.TryGet(asetName); + if (asetOutput == null) throw new Exception($"The availability set {asetName} should have existed."); From 46c5a30161e0ad40b5fc84db437e019d90abde75 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 15:25:06 +0800 Subject: [PATCH 11/13] Update ContainerBaseTest.cs --- .../Azure.ResourceManager.Core/tests/ContainerBaseTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs index 94dd2d9ac09e..68bdf4f6954c 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs @@ -19,7 +19,7 @@ public class ContainerBaseTest [OneTimeSetUp] public void GlobalSetUp() { - _container = new AzureResourceManagerClient().DefaultSubscription.GetResourceGroupContainer(); + _container = new AzureResourceManagerClient(new DefaultAzureCredential()).DefaultSubscription.GetResourceGroupContainer(); _resourceGroup = _container.Construct(LocationData.WestUS2).CreateOrUpdate(_rgName); } From 7c5b8bef4372089f320e20fb66ba7e21b1eb7b63 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 16:27:34 +0800 Subject: [PATCH 12/13] Update TryGet Test --- .../ContainerTryGetTest.cs} | 23 +-- .../ContainerTryGetTest/DoesExistTest().json | 162 ++++++++++++++++++ .../DoesExistTest()Async.json | 162 ++++++++++++++++++ .../TryGetAsyncTest().json | 162 ++++++++++++++++++ .../TryGetAsyncTest()Async.json | 162 ++++++++++++++++++ .../ContainerTryGetTest/TryGetTest().json | 162 ++++++++++++++++++ .../TryGetTest()Async.json | 162 ++++++++++++++++++ 7 files changed, 984 insertions(+), 11 deletions(-) rename sdk/resourcemanager/Azure.ResourceManager.Core/tests/{ContainerBaseTest.cs => Scenario/ContainerTryGetTest.cs} (76%) create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json create mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs similarity index 76% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs index 68bdf4f6954c..d5ff6982ff20 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ContainerBaseTest.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs @@ -2,34 +2,34 @@ // Licensed under the MIT License. using System; using System.Threading.Tasks; -using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.Core; -using Azure.ResourceManager.Core.Resources; +using Azure.Core.TestFramework; using NUnit.Framework; namespace Azure.ResourceManager.Core.Tests { - public class ContainerBaseTest + public class ContainerTryGetTest : ResourceManagerTestBase { + private AzureResourceManagerClient _client; private ResourceGroupContainer _container; private ResourceGroup _resourceGroup; private readonly string _rgName = $"{Environment.UserName}-rg-{Environment.TickCount}"; - [OneTimeSetUp] - public void GlobalSetUp() + public ContainerTryGetTest(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) { - _container = new AzureResourceManagerClient(new DefaultAzureCredential()).DefaultSubscription.GetResourceGroupContainer(); - _resourceGroup = _container.Construct(LocationData.WestUS2).CreateOrUpdate(_rgName); } - [OneTimeTearDown] - public void GlobalTearDown() + [SetUp] + public void SetUp() { - _resourceGroup.StartDelete(); + _client = GetArmClient(); + _container = _client.DefaultSubscription.GetResourceGroupContainer(); + _resourceGroup = _container.Construct(LocationData.WestUS2).CreateOrUpdate(_rgName); } [TestCase] + [RecordedTest] public void TryGetTest() { ResourceGroup result = _container.TryGet(_rgName); @@ -40,6 +40,7 @@ public void TryGetTest() } [TestCase] + [RecordedTest] public async Task TryGetAsyncTest() { ResourceGroup result = await _container.TryGetAsync(_rgName); diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json new file mode 100644 index 000000000000..313be32ffc4a --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json @@ -0,0 +1,162 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "74f748eb21e4d6b11f5efcc9cee7ca44", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "403", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "08c0c6d4-79d2-4aeb-9c41-c4d1d33208ef", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "08c0c6d4-79d2-4aeb-9c41-c4d1d33208ef", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082404Z:08c0c6d4-79d2-4aeb-9c41-c4d1d33208ef" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "ACR - TEST - China Team", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54524515?api-version=2019-10-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "c2bf17069d196408389f10b0584c32c6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9578e5da-6afa-4f3c-b183-8c685b776c08", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "9578e5da-6afa-4f3c-b183-8c685b776c08", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082406Z:9578e5da-6afa-4f3c-b183-8c685b776c08" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54524515", + "name": "v-minghc-rg-54524515", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54524515?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "02d6d869d82f54e3fdfe196873a757e8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "38cb3c9b-3005-4014-84df-6d807d0a31ef", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "38cb3c9b-3005-4014-84df-6d807d0a31ef", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082406Z:38cb3c9b-3005-4014-84df-6d807d0a31ef" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54524515", + "name": "v-minghc-rg-54524515", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName18?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "be1c59585ccc4d733f933c4510017ed3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "102", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d2a20efa-c6e9-40f5-88e2-83cd373b6b86", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "d2a20efa-c6e9-40f5-88e2-83cd373b6b86", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082407Z:d2a20efa-c6e9-40f5-88e2-83cd373b6b86" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027FakeName18\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "718120926", + "SUBSCRIPTION_ID": "0accec26-d6de-4757-8e74-d080f38eaaab" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json new file mode 100644 index 000000000000..947e8b5d5c1a --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json @@ -0,0 +1,162 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "be578ec0750fe5f918dcdd8a5df490b8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "403", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:18 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "865d4cca-db6f-4a5f-ba4c-330f849a80bf", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "865d4cca-db6f-4a5f-ba4c-330f849a80bf", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082518Z:865d4cca-db6f-4a5f-ba4c-330f849a80bf" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "ACR - TEST - China Team", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54598515?api-version=2019-10-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "3527494a857029c07f87693d9368751c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "884a9818-ee00-4014-a376-786ec6323244", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "884a9818-ee00-4014-a376-786ec6323244", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082521Z:884a9818-ee00-4014-a376-786ec6323244" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54598515", + "name": "v-minghc-rg-54598515", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54598515?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "b381695178ad49abbf21c73827e08c45", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d90f3219-e1dc-4725-9917-6a16707378d0", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "d90f3219-e1dc-4725-9917-6a16707378d0", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082521Z:d90f3219-e1dc-4725-9917-6a16707378d0" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54598515", + "name": "v-minghc-rg-54598515", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName32?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "e30080e82c543a9fcd2d3f870bbc52af", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "102", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4fad8126-18d1-4f4b-aab3-ac5dafdc4076", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "4fad8126-18d1-4f4b-aab3-ac5dafdc4076", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082521Z:4fad8126-18d1-4f4b-aab3-ac5dafdc4076" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027FakeName32\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1615539813", + "SUBSCRIPTION_ID": "0accec26-d6de-4757-8e74-d080f38eaaab" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json new file mode 100644 index 000000000000..0c88947134d1 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json @@ -0,0 +1,162 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "8d6ad085b2d66727ecd973dad31c57db", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "403", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d042f706-cb15-4044-aace-8173f58e2c58", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "d042f706-cb15-4044-aace-8173f58e2c58", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082443Z:d042f706-cb15-4044-aace-8173f58e2c58" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "ACR - TEST - China Team", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54563359?api-version=2019-10-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "da6527b6c3d8f0ef3cc724b8c7c04f6f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bec5d856-437f-4138-b508-71915bcbd1c7", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "bec5d856-437f-4138-b508-71915bcbd1c7", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082446Z:bec5d856-437f-4138-b508-71915bcbd1c7" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54563359", + "name": "v-minghc-rg-54563359", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54563359?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "ed47aa877f629d743a042d8a7e1c4be7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "69e93767-7225-4831-b4ab-90b4cf76d2a2", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "69e93767-7225-4831-b4ab-90b4cf76d2a2", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082446Z:69e93767-7225-4831-b4ab-90b4cf76d2a2" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54563359", + "name": "v-minghc-rg-54563359", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName28?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "b37889ea98e9c1c6e079500e8e6ea02c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "102", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:24:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3929a99b-3a16-4745-8b83-b116e93131b5", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "3929a99b-3a16-4745-8b83-b116e93131b5", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082446Z:3929a99b-3a16-4745-8b83-b116e93131b5" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027FakeName28\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "2022059398", + "SUBSCRIPTION_ID": "0accec26-d6de-4757-8e74-d080f38eaaab" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json new file mode 100644 index 000000000000..1bb52c47cceb --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json @@ -0,0 +1,162 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "eaea601333f755c3988d80352c9d7a1c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "403", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fe3eb808-e1aa-4693-9734-6a123eef22fd", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "fe3eb808-e1aa-4693-9734-6a123eef22fd", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082539Z:fe3eb808-e1aa-4693-9734-6a123eef22fd" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "ACR - TEST - China Team", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54619875?api-version=2019-10-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "5877536f5ec87537b2534db8cc8768f1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c7ea1029-683e-4bca-b28f-573e7e2e84f3", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "c7ea1029-683e-4bca-b28f-573e7e2e84f3", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082542Z:c7ea1029-683e-4bca-b28f-573e7e2e84f3" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54619875", + "name": "v-minghc-rg-54619875", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54619875?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "ec58e60f6296162e1f09f5dd93533fe0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d2a8ba29-1181-4ca7-9685-7fbf79b65590", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "d2a8ba29-1181-4ca7-9685-7fbf79b65590", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082542Z:d2a8ba29-1181-4ca7-9685-7fbf79b65590" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54619875", + "name": "v-minghc-rg-54619875", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName16?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "2cd91c38851db58b287438a3e60a8910", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "102", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4452d892-ddc8-4bc5-90a9-ca3f60419e28", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "4452d892-ddc8-4bc5-90a9-ca3f60419e28", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082542Z:4452d892-ddc8-4bc5-90a9-ca3f60419e28" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027FakeName16\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1161888214", + "SUBSCRIPTION_ID": "0accec26-d6de-4757-8e74-d080f38eaaab" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json new file mode 100644 index 000000000000..9e94775c87e2 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json @@ -0,0 +1,162 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "298d91fa4abf217c9ce3841a8d26025e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "403", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "dd89db11-0e94-4a24-9d17-54ebf6283ad0", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "dd89db11-0e94-4a24-9d17-54ebf6283ad0", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082500Z:dd89db11-0e94-4a24-9d17-54ebf6283ad0" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "ACR - TEST - China Team", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54579984?api-version=2019-10-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "934346533ee826dcc35a3d1d3b4581c6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d7c67196-2334-4682-aad9-02c6250df5de", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "d7c67196-2334-4682-aad9-02c6250df5de", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082502Z:d7c67196-2334-4682-aad9-02c6250df5de" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54579984", + "name": "v-minghc-rg-54579984", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54579984?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "c34c1fbbdbc4e2e85a89cd72ccc48f3d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b6d96dc8-9734-47bf-afae-ef44aed95cc8", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "b6d96dc8-9734-47bf-afae-ef44aed95cc8", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082502Z:b6d96dc8-9734-47bf-afae-ef44aed95cc8" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54579984", + "name": "v-minghc-rg-54579984", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName55?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "73ff6fdb5965bcf6b56765650c5fe557", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "102", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:25:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5fc31044-5036-45f1-ace0-91e03273bb5b", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "5fc31044-5036-45f1-ace0-91e03273bb5b", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082502Z:5fc31044-5036-45f1-ace0-91e03273bb5b" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027FakeName55\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "357280712", + "SUBSCRIPTION_ID": "0accec26-d6de-4757-8e74-d080f38eaaab" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json new file mode 100644 index 000000000000..63011fe0b26b --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json @@ -0,0 +1,162 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "e327fc4517bb78bac63c96daaf951470", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "403", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:26:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "045958d8-62e7-4454-9d19-1a6d67537264", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "045958d8-62e7-4454-9d19-1a6d67537264", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082612Z:045958d8-62e7-4454-9d19-1a6d67537264" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "0accec26-d6de-4757-8e74-d080f38eaaab", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "ACR - TEST - China Team", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54652453?api-version=2019-10-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "34", + "Content-Type": "application/json", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "7480119012ebc6e54bca16570b21b9ba", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:26:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "db6275be-d1e4-4a9a-b7cd-ab0a4be2f5a0", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "db6275be-d1e4-4a9a-b7cd-ab0a4be2f5a0", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082614Z:db6275be-d1e4-4a9a-b7cd-ab0a4be2f5a0" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54652453", + "name": "v-minghc-rg-54652453", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54652453?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "e34ec63631f3a77656bab6bf06b080a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "248", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:26:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4800c117-3642-44c8-9075-ffc397b7ad4c", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "4800c117-3642-44c8-9075-ffc397b7ad4c", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082614Z:4800c117-3642-44c8-9075-ffc397b7ad4c" + }, + "ResponseBody": { + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54652453", + "name": "v-minghc-rg-54652453", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName18?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", + "x-ms-client-request-id": "037b2d7591b43372166198f001626ca4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "102", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 12 Mar 2021 08:26:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "324c2bed-2d4c-41f5-81c2-8f37c6270891", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "324c2bed-2d4c-41f5-81c2-8f37c6270891", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082614Z:324c2bed-2d4c-41f5-81c2-8f37c6270891" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027FakeName18\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "10635373", + "SUBSCRIPTION_ID": "0accec26-d6de-4757-8e74-d080f38eaaab" + } +} \ No newline at end of file From 6558ae9b3ee85693315cf9f9df978d8c5068d361 Mon Sep 17 00:00:00 2001 From: Harvey Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 12 Mar 2021 16:45:41 +0800 Subject: [PATCH 13/13] Update tests --- .../tests/Scenario/ContainerTryGetTest.cs | 9 +-- .../ContainerTryGetTest/DoesExistTest().json | 70 +++++++++---------- .../DoesExistTest()Async.json | 70 +++++++++---------- .../TryGetAsyncTest().json | 62 ++++++++-------- .../TryGetAsyncTest()Async.json | 70 +++++++++---------- .../ContainerTryGetTest/TryGetTest().json | 70 +++++++++---------- .../TryGetTest()Async.json | 70 +++++++++---------- 7 files changed, 211 insertions(+), 210 deletions(-) diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs index d5ff6982ff20..2a4d95d6c8f6 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ContainerTryGetTest.cs @@ -13,7 +13,7 @@ public class ContainerTryGetTest : ResourceManagerTestBase private AzureResourceManagerClient _client; private ResourceGroupContainer _container; private ResourceGroup _resourceGroup; - private readonly string _rgName = $"{Environment.UserName}-rg-{Environment.TickCount}"; + private string _rgName; public ContainerTryGetTest(bool isAsync) : base(isAsync)//, RecordedTestMode.Record) @@ -23,6 +23,7 @@ public ContainerTryGetTest(bool isAsync) [SetUp] public void SetUp() { + _rgName = Recording.GenerateAssetName("CoreRg"); _client = GetArmClient(); _container = _client.DefaultSubscription.GetResourceGroupContainer(); _resourceGroup = _container.Construct(LocationData.WestUS2).CreateOrUpdate(_rgName); @@ -35,7 +36,7 @@ public void TryGetTest() ResourceGroup result = _container.TryGet(_rgName); Assert.NotNull(result); Assert.IsTrue(result.Data.Name == _rgName); - result = _container.TryGet("FakeName"+ new Random().Next(1,100)); + result = _container.TryGet("FakeName"); Assert.IsNull(result); } @@ -46,7 +47,7 @@ public async Task TryGetAsyncTest() ResourceGroup result = await _container.TryGetAsync(_rgName); Assert.NotNull(result); Assert.IsTrue(result.Data.Name == _rgName); - result = await _container.TryGetAsync("FakeName" + new Random().Next(1, 100)); + result = await _container.TryGetAsync("FakeName"); Assert.IsNull(result); } @@ -54,7 +55,7 @@ public async Task TryGetAsyncTest() public void DoesExistTest() { Assert.IsTrue(_container.DoesExist(_rgName)); - Assert.IsFalse(_container.DoesExist("FakeName" + new Random().Next(1, 100))); + Assert.IsFalse(_container.DoesExist("FakeName")); } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json index 313be32ffc4a..fa84ebc974a6 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest().json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "74f748eb21e4d6b11f5efcc9cee7ca44", + "x-ms-client-request-id": "e474f748b1211fd65efcc9cee7ca4406", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "403", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:04 GMT", + "Date": "Fri, 12 Mar 2021 08:43:32 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "08c0c6d4-79d2-4aeb-9c41-c4d1d33208ef", - "x-ms-ratelimit-remaining-subscription-reads": "11992", - "x-ms-request-id": "08c0c6d4-79d2-4aeb-9c41-c4d1d33208ef", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082404Z:08c0c6d4-79d2-4aeb-9c41-c4d1d33208ef" + "x-ms-correlation-request-id": "b6f0759e-923c-457a-831d-d0bfd9013729", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "b6f0759e-923c-457a-831d-d0bfd9013729", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084333Z:b6f0759e-923c-457a-831d-d0bfd9013729" }, "ResponseBody": { "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", @@ -42,7 +42,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54524515?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg1175?api-version=2019-10-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -50,7 +50,7 @@ "Content-Length": "34", "Content-Type": "application/json", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "c2bf17069d196408389f10b0584c32c6", + "x-ms-client-request-id": "19c2bf17089d38649f10b0584c32c669", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -60,21 +60,21 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:06 GMT", + "Date": "Fri, 12 Mar 2021 08:43:36 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9578e5da-6afa-4f3c-b183-8c685b776c08", - "x-ms-ratelimit-remaining-subscription-writes": "1196", - "x-ms-request-id": "9578e5da-6afa-4f3c-b183-8c685b776c08", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082406Z:9578e5da-6afa-4f3c-b183-8c685b776c08" + "x-ms-correlation-request-id": "a45740e1-3f1b-4f75-b533-76bce716d9a4", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "a45740e1-3f1b-4f75-b533-76bce716d9a4", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084336Z:a45740e1-3f1b-4f75-b533-76bce716d9a4" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54524515", - "name": "v-minghc-rg-54524515", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg1175", + "name": "CoreRg1175", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -84,34 +84,34 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54524515?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg1175?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "02d6d869d82f54e3fdfe196873a757e8", + "x-ms-client-request-id": "2f02d6d8e3d8fd54fe196873a757e858", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:06 GMT", + "Date": "Fri, 12 Mar 2021 08:43:36 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "38cb3c9b-3005-4014-84df-6d807d0a31ef", - "x-ms-ratelimit-remaining-subscription-reads": "11991", - "x-ms-request-id": "38cb3c9b-3005-4014-84df-6d807d0a31ef", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082406Z:38cb3c9b-3005-4014-84df-6d807d0a31ef" + "x-ms-correlation-request-id": "64c8b311-3f2f-484d-9834-36089bff54c7", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "64c8b311-3f2f-484d-9834-36089bff54c7", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084336Z:64c8b311-3f2f-484d-9834-36089bff54c7" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54524515", - "name": "v-minghc-rg-54524515", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg1175", + "name": "CoreRg1175", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -121,36 +121,36 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName18?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "be1c59585ccc4d733f933c4510017ed3", + "x-ms-client-request-id": "ccbe1c59735c3f4d933c4510017ed32c", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "102", + "Content-Length": "100", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:06 GMT", + "Date": "Fri, 12 Mar 2021 08:43:36 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d2a20efa-c6e9-40f5-88e2-83cd373b6b86", + "x-ms-correlation-request-id": "c0b7113e-2087-4a97-8308-b1f876991be6", "x-ms-failure-cause": "gateway", - "x-ms-ratelimit-remaining-subscription-reads": "11990", - "x-ms-request-id": "d2a20efa-c6e9-40f5-88e2-83cd373b6b86", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082407Z:d2a20efa-c6e9-40f5-88e2-83cd373b6b86" + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "c0b7113e-2087-4a97-8308-b1f876991be6", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084336Z:c0b7113e-2087-4a97-8308-b1f876991be6" }, "ResponseBody": { "error": { "code": "ResourceGroupNotFound", - "message": "Resource group \u0027FakeName18\u0027 could not be found." + "message": "Resource group \u0027FakeName\u0027 could not be found." } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json index 947e8b5d5c1a..597f24655252 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/DoesExistTest()Async.json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "be578ec0750fe5f918dcdd8a5df490b8", + "x-ms-client-request-id": "0fbe578ef97518e5dcdd8a5df490b84a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "403", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:18 GMT", + "Date": "Fri, 12 Mar 2021 08:44:12 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "865d4cca-db6f-4a5f-ba4c-330f849a80bf", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "865d4cca-db6f-4a5f-ba4c-330f849a80bf", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082518Z:865d4cca-db6f-4a5f-ba4c-330f849a80bf" + "x-ms-correlation-request-id": "1fe5a98a-d25f-46f9-b2cd-ff08b9d784a0", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "1fe5a98a-d25f-46f9-b2cd-ff08b9d784a0", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084413Z:1fe5a98a-d25f-46f9-b2cd-ff08b9d784a0" }, "ResponseBody": { "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", @@ -42,7 +42,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54598515?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg1178?api-version=2019-10-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -50,7 +50,7 @@ "Content-Length": "34", "Content-Type": "application/json", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "3527494a857029c07f87693d9368751c", + "x-ms-client-request-id": "70352749c0857f2987693d9368751c51", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -60,21 +60,21 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:20 GMT", + "Date": "Fri, 12 Mar 2021 08:44:14 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "884a9818-ee00-4014-a376-786ec6323244", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "884a9818-ee00-4014-a376-786ec6323244", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082521Z:884a9818-ee00-4014-a376-786ec6323244" + "x-ms-correlation-request-id": "e515fb71-7d8a-4081-9601-3a30d1a62a2d", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "e515fb71-7d8a-4081-9601-3a30d1a62a2d", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084414Z:e515fb71-7d8a-4081-9601-3a30d1a62a2d" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54598515", - "name": "v-minghc-rg-54598515", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg1178", + "name": "CoreRg1178", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -84,34 +84,34 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54598515?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg1178?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "b381695178ad49abbf21c73827e08c45", + "x-ms-client-request-id": "adb38169ab78bf4921c73827e08c45e8", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:20 GMT", + "Date": "Fri, 12 Mar 2021 08:44:14 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d90f3219-e1dc-4725-9917-6a16707378d0", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "d90f3219-e1dc-4725-9917-6a16707378d0", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082521Z:d90f3219-e1dc-4725-9917-6a16707378d0" + "x-ms-correlation-request-id": "01e57633-8fc9-4be1-8550-b7a4e099ab96", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "01e57633-8fc9-4be1-8550-b7a4e099ab96", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084414Z:01e57633-8fc9-4be1-8550-b7a4e099ab96" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54598515", - "name": "v-minghc-rg-54598515", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg1178", + "name": "CoreRg1178", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -121,36 +121,36 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName32?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "e30080e82c543a9fcd2d3f870bbc52af", + "x-ms-client-request-id": "54e300809f2ccd3a2d3f870bbc52af66", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "102", + "Content-Length": "100", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:20 GMT", + "Date": "Fri, 12 Mar 2021 08:44:14 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4fad8126-18d1-4f4b-aab3-ac5dafdc4076", + "x-ms-correlation-request-id": "3291c4ac-c0ef-4c75-949d-823255fa2e36", "x-ms-failure-cause": "gateway", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "4fad8126-18d1-4f4b-aab3-ac5dafdc4076", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082521Z:4fad8126-18d1-4f4b-aab3-ac5dafdc4076" + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "3291c4ac-c0ef-4c75-949d-823255fa2e36", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084414Z:3291c4ac-c0ef-4c75-949d-823255fa2e36" }, "ResponseBody": { "error": { "code": "ResourceGroupNotFound", - "message": "Resource group \u0027FakeName32\u0027 could not be found." + "message": "Resource group \u0027FakeName\u0027 could not be found." } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json index 0c88947134d1..7935e6d50549 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest().json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "8d6ad085b2d66727ecd973dad31c57db", + "x-ms-client-request-id": "d68d6ad027b2ec67d973dad31c57dbb6", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "403", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:42 GMT", + "Date": "Fri, 12 Mar 2021 08:43:51 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d042f706-cb15-4044-aace-8173f58e2c58", + "x-ms-correlation-request-id": "6743807a-7e87-4c24-988d-ed30f369c7e9", "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "d042f706-cb15-4044-aace-8173f58e2c58", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082443Z:d042f706-cb15-4044-aace-8173f58e2c58" + "x-ms-request-id": "6743807a-7e87-4c24-988d-ed30f369c7e9", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084352Z:6743807a-7e87-4c24-988d-ed30f369c7e9" }, "ResponseBody": { "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", @@ -42,7 +42,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54563359?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg354?api-version=2019-10-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -50,7 +50,7 @@ "Content-Length": "34", "Content-Type": "application/json", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "da6527b6c3d8f0ef3cc724b8c7c04f6f", + "x-ms-client-request-id": "d8da6527efc33cf0c724b8c7c04f6f87", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -60,21 +60,21 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "226", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:45 GMT", + "Date": "Fri, 12 Mar 2021 08:43:54 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bec5d856-437f-4138-b508-71915bcbd1c7", + "x-ms-correlation-request-id": "fcf8e26a-2b2c-4935-a865-43decea34ac3", "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "bec5d856-437f-4138-b508-71915bcbd1c7", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082446Z:bec5d856-437f-4138-b508-71915bcbd1c7" + "x-ms-request-id": "fcf8e26a-2b2c-4935-a865-43decea34ac3", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084355Z:fcf8e26a-2b2c-4935-a865-43decea34ac3" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54563359", - "name": "v-minghc-rg-54563359", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg354", + "name": "CoreRg354", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -84,34 +84,34 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54563359?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg354?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "ed47aa877f629d743a042d8a7e1c4be7", + "x-ms-client-request-id": "62ed47aa747f3a9d042d8a7e1c4be7ea", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "226", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:45 GMT", + "Date": "Fri, 12 Mar 2021 08:43:54 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "69e93767-7225-4831-b4ab-90b4cf76d2a2", + "x-ms-correlation-request-id": "8b69b91e-f43a-4d75-94dd-e7ac3b6af48a", "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "69e93767-7225-4831-b4ab-90b4cf76d2a2", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082446Z:69e93767-7225-4831-b4ab-90b4cf76d2a2" + "x-ms-request-id": "8b69b91e-f43a-4d75-94dd-e7ac3b6af48a", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084355Z:8b69b91e-f43a-4d75-94dd-e7ac3b6af48a" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54563359", - "name": "v-minghc-rg-54563359", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg354", + "name": "CoreRg354", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -121,36 +121,36 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName28?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "b37889ea98e9c1c6e079500e8e6ea02c", + "x-ms-client-request-id": "e9b37889c698e0c179500e8e6ea02c8a", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "102", + "Content-Length": "100", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:24:45 GMT", + "Date": "Fri, 12 Mar 2021 08:43:54 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3929a99b-3a16-4745-8b83-b116e93131b5", + "x-ms-correlation-request-id": "d86c122b-03b1-4b10-ab94-5fa2431df1f4", "x-ms-failure-cause": "gateway", "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "3929a99b-3a16-4745-8b83-b116e93131b5", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082446Z:3929a99b-3a16-4745-8b83-b116e93131b5" + "x-ms-request-id": "d86c122b-03b1-4b10-ab94-5fa2431df1f4", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084355Z:d86c122b-03b1-4b10-ab94-5fa2431df1f4" }, "ResponseBody": { "error": { "code": "ResourceGroupNotFound", - "message": "Resource group \u0027FakeName28\u0027 could not be found." + "message": "Resource group \u0027FakeName\u0027 could not be found." } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json index 1bb52c47cceb..031474d1b3da 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetAsyncTest()Async.json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "eaea601333f755c3988d80352c9d7a1c", + "x-ms-client-request-id": "f7eaea60c33398558d80352c9d7a1c6f", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "403", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:39 GMT", + "Date": "Fri, 12 Mar 2021 08:44:16 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fe3eb808-e1aa-4693-9734-6a123eef22fd", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "fe3eb808-e1aa-4693-9734-6a123eef22fd", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082539Z:fe3eb808-e1aa-4693-9734-6a123eef22fd" + "x-ms-correlation-request-id": "1eef3f56-117e-4031-bbe8-742c7649eb1a", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "1eef3f56-117e-4031-bbe8-742c7649eb1a", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084416Z:1eef3f56-117e-4031-bbe8-742c7649eb1a" }, "ResponseBody": { "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", @@ -42,7 +42,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54619875?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg9777?api-version=2019-10-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -50,7 +50,7 @@ "Content-Length": "34", "Content-Type": "application/json", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "5877536f5ec87537b2534db8cc8768f1", + "x-ms-client-request-id": "c8587753375eb275534db8cc8768f10f", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -60,21 +60,21 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:41 GMT", + "Date": "Fri, 12 Mar 2021 08:44:17 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c7ea1029-683e-4bca-b28f-573e7e2e84f3", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "c7ea1029-683e-4bca-b28f-573e7e2e84f3", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082542Z:c7ea1029-683e-4bca-b28f-573e7e2e84f3" + "x-ms-correlation-request-id": "dc69312a-1c67-4f9c-a1dd-d4351447c565", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "dc69312a-1c67-4f9c-a1dd-d4351447c565", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084417Z:dc69312a-1c67-4f9c-a1dd-d4351447c565" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54619875", - "name": "v-minghc-rg-54619875", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg9777", + "name": "CoreRg9777", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -84,34 +84,34 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54619875?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg9777?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "ec58e60f6296162e1f09f5dd93533fe0", + "x-ms-client-request-id": "96ec58e62e621f1609f5dd93533fe038", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:41 GMT", + "Date": "Fri, 12 Mar 2021 08:44:17 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d2a8ba29-1181-4ca7-9685-7fbf79b65590", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "d2a8ba29-1181-4ca7-9685-7fbf79b65590", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082542Z:d2a8ba29-1181-4ca7-9685-7fbf79b65590" + "x-ms-correlation-request-id": "677b8456-73fa-4b7b-a02a-591aeeb6cac2", + "x-ms-ratelimit-remaining-subscription-reads": "11987", + "x-ms-request-id": "677b8456-73fa-4b7b-a02a-591aeeb6cac2", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084417Z:677b8456-73fa-4b7b-a02a-591aeeb6cac2" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54619875", - "name": "v-minghc-rg-54619875", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg9777", + "name": "CoreRg9777", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -121,36 +121,36 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName16?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "2cd91c38851db58b287438a3e60a8910", + "x-ms-client-request-id": "1d2cd91c8b8528b57438a3e60a891025", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "102", + "Content-Length": "100", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:41 GMT", + "Date": "Fri, 12 Mar 2021 08:44:17 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4452d892-ddc8-4bc5-90a9-ca3f60419e28", + "x-ms-correlation-request-id": "102a58e9-17da-47b2-ad30-d5648a1f4fe5", "x-ms-failure-cause": "gateway", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "4452d892-ddc8-4bc5-90a9-ca3f60419e28", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082542Z:4452d892-ddc8-4bc5-90a9-ca3f60419e28" + "x-ms-ratelimit-remaining-subscription-reads": "11986", + "x-ms-request-id": "102a58e9-17da-47b2-ad30-d5648a1f4fe5", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084417Z:102a58e9-17da-47b2-ad30-d5648a1f4fe5" }, "ResponseBody": { "error": { "code": "ResourceGroupNotFound", - "message": "Resource group \u0027FakeName16\u0027 could not be found." + "message": "Resource group \u0027FakeName\u0027 could not be found." } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json index 9e94775c87e2..2a153e38e555 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest().json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "298d91fa4abf217c9ce3841a8d26025e", + "x-ms-client-request-id": "bf298d917c4a9c21e3841a8d26025e53", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "403", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:00 GMT", + "Date": "Fri, 12 Mar 2021 08:43:57 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "dd89db11-0e94-4a24-9d17-54ebf6283ad0", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "dd89db11-0e94-4a24-9d17-54ebf6283ad0", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082500Z:dd89db11-0e94-4a24-9d17-54ebf6283ad0" + "x-ms-correlation-request-id": "0b4917d1-1a04-45ec-acad-563b6ab7ad85", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "0b4917d1-1a04-45ec-acad-563b6ab7ad85", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084358Z:0b4917d1-1a04-45ec-acad-563b6ab7ad85" }, "ResponseBody": { "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", @@ -42,7 +42,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54579984?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg9464?api-version=2019-10-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -50,7 +50,7 @@ "Content-Length": "34", "Content-Type": "application/json", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "934346533ee826dcc35a3d1d3b4581c6", + "x-ms-client-request-id": "e8934346dc3ec3265a3d1d3b4581c6bb", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -60,21 +60,21 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:02 GMT", + "Date": "Fri, 12 Mar 2021 08:43:59 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d7c67196-2334-4682-aad9-02c6250df5de", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "d7c67196-2334-4682-aad9-02c6250df5de", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082502Z:d7c67196-2334-4682-aad9-02c6250df5de" + "x-ms-correlation-request-id": "abb4dd8f-0870-414f-9a1b-8dcd08c77f72", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "abb4dd8f-0870-414f-9a1b-8dcd08c77f72", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084400Z:abb4dd8f-0870-414f-9a1b-8dcd08c77f72" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54579984", - "name": "v-minghc-rg-54579984", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg9464", + "name": "CoreRg9464", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -84,34 +84,34 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54579984?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg9464?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "c34c1fbbdbc4e2e85a89cd72ccc48f3d", + "x-ms-client-request-id": "c4c34c1fe8db5ae289cd72ccc48f3ddb", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:02 GMT", + "Date": "Fri, 12 Mar 2021 08:43:59 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b6d96dc8-9734-47bf-afae-ef44aed95cc8", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "b6d96dc8-9734-47bf-afae-ef44aed95cc8", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082502Z:b6d96dc8-9734-47bf-afae-ef44aed95cc8" + "x-ms-correlation-request-id": "eb487da5-d4f8-47d2-b656-030005a50cdb", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "eb487da5-d4f8-47d2-b656-030005a50cdb", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084400Z:eb487da5-d4f8-47d2-b656-030005a50cdb" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54579984", - "name": "v-minghc-rg-54579984", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg9464", + "name": "CoreRg9464", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -121,36 +121,36 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName55?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "73ff6fdb5965bcf6b56765650c5fe557", + "x-ms-client-request-id": "6573ff6ff659b5bc6765650c5fe55762", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "102", + "Content-Length": "100", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:25:02 GMT", + "Date": "Fri, 12 Mar 2021 08:43:59 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5fc31044-5036-45f1-ace0-91e03273bb5b", + "x-ms-correlation-request-id": "1549eea9-60d8-4637-b302-c6eedef071fb", "x-ms-failure-cause": "gateway", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "5fc31044-5036-45f1-ace0-91e03273bb5b", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082502Z:5fc31044-5036-45f1-ace0-91e03273bb5b" + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "1549eea9-60d8-4637-b302-c6eedef071fb", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084400Z:1549eea9-60d8-4637-b302-c6eedef071fb" }, "ResponseBody": { "error": { "code": "ResourceGroupNotFound", - "message": "Resource group \u0027FakeName55\u0027 could not be found." + "message": "Resource group \u0027FakeName\u0027 could not be found." } } } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json index 63011fe0b26b..e031cf4a0de1 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ContainerTryGetTest/TryGetTest()Async.json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "e327fc4517bb78bac63c96daaf951470", + "x-ms-client-request-id": "bbe327fcba17c6783c96daaf95147090", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "403", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:26:12 GMT", + "Date": "Fri, 12 Mar 2021 08:44:22 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "045958d8-62e7-4454-9d19-1a6d67537264", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "045958d8-62e7-4454-9d19-1a6d67537264", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082612Z:045958d8-62e7-4454-9d19-1a6d67537264" + "x-ms-correlation-request-id": "60643137-916c-41a0-beaf-3925f492dc5c", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "60643137-916c-41a0-beaf-3925f492dc5c", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084422Z:60643137-916c-41a0-beaf-3925f492dc5c" }, "ResponseBody": { "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab", @@ -42,7 +42,7 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54652453?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg8072?api-version=2019-10-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -50,7 +50,7 @@ "Content-Length": "34", "Content-Type": "application/json", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "7480119012ebc6e54bca16570b21b9ba", + "x-ms-client-request-id": "eb748011e5124bc6ca16570b21b9ba36", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -60,21 +60,21 @@ "StatusCode": 201, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:26:14 GMT", + "Date": "Fri, 12 Mar 2021 08:44:23 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "db6275be-d1e4-4a9a-b7cd-ab0a4be2f5a0", - "x-ms-ratelimit-remaining-subscription-writes": "1199", - "x-ms-request-id": "db6275be-d1e4-4a9a-b7cd-ab0a4be2f5a0", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082614Z:db6275be-d1e4-4a9a-b7cd-ab0a4be2f5a0" + "x-ms-correlation-request-id": "c624c8ff-ff48-4290-89db-c9e563f8d3a0", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "c624c8ff-ff48-4290-89db-c9e563f8d3a0", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084423Z:c624c8ff-ff48-4290-89db-c9e563f8d3a0" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54652453", - "name": "v-minghc-rg-54652453", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg8072", + "name": "CoreRg8072", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -84,34 +84,34 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/v-minghc-rg-54652453?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/CoreRg8072?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "e34ec63631f3a77656bab6bf06b080a9", + "x-ms-client-request-id": "f3e34ec6763156a7bab6bf06b080a975", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "248", + "Content-Length": "228", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:26:14 GMT", + "Date": "Fri, 12 Mar 2021 08:44:23 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4800c117-3642-44c8-9075-ffc397b7ad4c", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "4800c117-3642-44c8-9075-ffc397b7ad4c", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082614Z:4800c117-3642-44c8-9075-ffc397b7ad4c" + "x-ms-correlation-request-id": "b76c90a2-fbbf-4725-9df4-8b507fc63702", + "x-ms-ratelimit-remaining-subscription-reads": "11984", + "x-ms-request-id": "b76c90a2-fbbf-4725-9df4-8b507fc63702", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084423Z:b76c90a2-fbbf-4725-9df4-8b507fc63702" }, "ResponseBody": { - "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/v-minghc-rg-54652453", - "name": "v-minghc-rg-54652453", + "id": "/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourceGroups/CoreRg8072", + "name": "CoreRg8072", "type": "Microsoft.Resources/resourceGroups", "location": "westus2", "tags": {}, @@ -121,36 +121,36 @@ } }, { - "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName18?api-version=2019-10-01", + "RequestUri": "https://management.azure.com/subscriptions/0accec26-d6de-4757-8e74-d080f38eaaab/resourcegroups/FakeName?api-version=2019-10-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "037b2d7591b43372166198f001626ca4", + "x-ms-client-request-id": "b4037b2d729116336198f001626ca483", "x-ms-return-client-request-id": "true" }, "RequestBody": null, "StatusCode": 404, "ResponseHeaders": { "Cache-Control": "no-cache", - "Content-Length": "102", + "Content-Length": "100", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 12 Mar 2021 08:26:14 GMT", + "Date": "Fri, 12 Mar 2021 08:44:23 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "324c2bed-2d4c-41f5-81c2-8f37c6270891", + "x-ms-correlation-request-id": "34d1f1b6-a4ef-4407-a3df-5e9cc74b3b90", "x-ms-failure-cause": "gateway", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "324c2bed-2d4c-41f5-81c2-8f37c6270891", - "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T082614Z:324c2bed-2d4c-41f5-81c2-8f37c6270891" + "x-ms-ratelimit-remaining-subscription-reads": "11983", + "x-ms-request-id": "34d1f1b6-a4ef-4407-a3df-5e9cc74b3b90", + "x-ms-routing-request-id": "SOUTHEASTASIA:20210312T084423Z:34d1f1b6-a4ef-4407-a3df-5e9cc74b3b90" }, "ResponseBody": { "error": { "code": "ResourceGroupNotFound", - "message": "Resource group \u0027FakeName18\u0027 could not be found." + "message": "Resource group \u0027FakeName\u0027 could not be found." } } }