diff --git a/common/ManagementTestShared/ManagementRecordedTestBase.cs b/common/ManagementTestShared/Current/ManagementRecordedTestBase.cs similarity index 100% rename from common/ManagementTestShared/ManagementRecordedTestBase.cs rename to common/ManagementTestShared/Current/ManagementRecordedTestBase.cs diff --git a/common/ManagementTestShared/ResourceGroupCleanupPolicy.cs b/common/ManagementTestShared/Current/ResourceGroupCleanupPolicy.cs similarity index 82% rename from common/ManagementTestShared/ResourceGroupCleanupPolicy.cs rename to common/ManagementTestShared/Current/ResourceGroupCleanupPolicy.cs index 9a6e0142fba61..715a6e76773cd 100644 --- a/common/ManagementTestShared/ResourceGroupCleanupPolicy.cs +++ b/common/ManagementTestShared/Current/ResourceGroupCleanupPolicy.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.TestFramework { public class ResourceGroupCleanupPolicy : HttpPipelineSynchronousPolicy { + private readonly object _listLock = new object(); private Regex _resourceGroupPattern = new Regex(@"/subscriptions/[^/]+/resourcegroups/([^?/]+)\?api-version"); private readonly IList _resourceGroupCreated = new List(); @@ -26,7 +27,10 @@ public override void OnSendingRequest(HttpMessage message) var match = _resourceGroupPattern.Match(message.Request.Uri.ToString()); if (match.Success) { - _resourceGroupCreated.Add(match.Groups[1].Value); + lock (_listLock) + { + _resourceGroupCreated.Add(match.Groups[1].Value); + } } } } diff --git a/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs b/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs new file mode 100644 index 0000000000000..ae54339477942 --- /dev/null +++ b/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Core; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.TestFramework +{ + public abstract class ManagementRecordedTestBase : RecordedTestBase + where TEnvironment: TestEnvironment, new() + { + protected ResourceGroupCleanupPolicy CleanupPolicy = new ResourceGroupCleanupPolicy(); + + protected ResourceGroupCleanupPolicy OneTimeCleanupPolicy = new ResourceGroupCleanupPolicy(); + + protected AzureResourceManagerClient GlobalClient { get; private set; } + + public TestEnvironment SessionEnvironment { get; private set; } + + public TestRecording SessionRecording { get; private set; } + + private AzureResourceManagerClient _cleanupClient; + + protected ManagementRecordedTestBase(bool isAsync) : base(isAsync) + { + SessionEnvironment = new TEnvironment(); + SessionEnvironment.Mode = Mode; + } + + protected ManagementRecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) + { + SessionEnvironment = new TEnvironment(); + SessionEnvironment.Mode = Mode; + } + + private AzureResourceManagerClient GetCleanupClient() + { + if (Mode != RecordedTestMode.Playback) + { + return new AzureResourceManagerClient( + TestEnvironment.SubscriptionId, + TestEnvironment.Credential, + new AzureResourceManagerClientOptions()); + } + return null; + } + + protected AzureResourceManagerClient GetArmClient() + { + var options = InstrumentClientOptions(new AzureResourceManagerClientOptions()); + options.AddPolicy(CleanupPolicy, HttpPipelinePosition.PerCall); + + return CreateClient( + TestEnvironment.SubscriptionId, + TestEnvironment.Credential, + options); + } + + [SetUp] + protected void Setup() + { + _cleanupClient ??= GetCleanupClient(); + } + + [TearDown] + protected void CleanupResourceGroups() + { + if (Mode != RecordedTestMode.Playback) + { + Parallel.ForEach(CleanupPolicy.ResourceGroupsCreated, resourceGroup => + { + _cleanupClient.GetResourceGroupOperations(TestEnvironment.SubscriptionId, resourceGroup).StartDelete(); + }); + } + } + + private void StartSessionRecording() + { + // Only create test recordings for the latest version of the service + TestContext.TestAdapter test = TestContext.CurrentContext.Test; + if (Mode != RecordedTestMode.Live && + test.Properties.ContainsKey("SkipRecordings")) + { + throw new IgnoreException((string)test.Properties.Get("SkipRecordings")); + } + SessionRecording = new TestRecording(Mode, GetSessionFilePath(), Sanitizer, Matcher); + SessionEnvironment.SetRecording(SessionRecording); + ValidateClientInstrumentation = SessionRecording.HasRequests; + } + + protected void StopSessionRecording() + { + if (ValidateClientInstrumentation) + { + throw new InvalidOperationException("The test didn't instrument any clients but had recordings. Please call InstrumentClient for the client being recorded."); + } + + SessionRecording?.Dispose(true); + GlobalClient = null; + } + + [OneTimeSetUp] + public void OneTimeSetUp() + { + if (!HasOneTimeSetup()) + return; + + StartSessionRecording(); + + var options = InstrumentClientOptions(new AzureResourceManagerClientOptions(), SessionRecording); + options.AddPolicy(OneTimeCleanupPolicy, HttpPipelinePosition.PerCall); + + GlobalClient = CreateClient( + SessionEnvironment.SubscriptionId, + SessionEnvironment.Credential, + options); + } + + private bool HasOneTimeSetup() + { + HashSet types = new HashSet(); + Type type = GetType(); + Type endType = typeof(ManagementRecordedTestBase); + while (type != endType) + { + types.Add(type); + type = type.BaseType; + } + + var methods = GetType().GetMethods().Where(m => types.Contains(m.DeclaringType)); + foreach (var method in methods) + { + foreach(var attr in method.GetCustomAttributes(false)) + { + if (attr is OneTimeSetUpAttribute) + return true; + } + } + return false; + } + + [OneTimeTearDown] + public void OneTimeCleanupResourceGroups() + { + if (Mode != RecordedTestMode.Playback) + { + Parallel.ForEach(OneTimeCleanupPolicy.ResourceGroupsCreated, resourceGroup => + { + _cleanupClient.GetResourceGroupOperations(SessionEnvironment.SubscriptionId, resourceGroup).StartDelete(); + }); + } + + if (!(GlobalClient is null)) + throw new InvalidOperationException("StopSessionRecording was never called please make sure you call that at the end of your OneTimeSetup"); + } + } +} diff --git a/common/ManagementTestShared/Redesign/ResourceGroupCleanupPolicy.cs b/common/ManagementTestShared/Redesign/ResourceGroupCleanupPolicy.cs new file mode 100644 index 0000000000000..715a6e76773cd --- /dev/null +++ b/common/ManagementTestShared/Redesign/ResourceGroupCleanupPolicy.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Text.RegularExpressions; + +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.TestFramework +{ + public class ResourceGroupCleanupPolicy : HttpPipelineSynchronousPolicy + { + private readonly object _listLock = new object(); + private Regex _resourceGroupPattern = new Regex(@"/subscriptions/[^/]+/resourcegroups/([^?/]+)\?api-version"); + private readonly IList _resourceGroupCreated = new List(); + + public IList ResourceGroupsCreated + { + get { return _resourceGroupCreated; } + } + + public override void OnSendingRequest(HttpMessage message) + { + if (message.Request.Method == RequestMethod.Put) + { + var match = _resourceGroupPattern.Match(message.Request.Uri.ToString()); + if (match.Success) + { + lock (_listLock) + { + _resourceGroupCreated.Add(match.Groups[1].Value); + } + } + } + } + } +} diff --git a/eng/Azure.Management.Test.targets b/eng/Azure.Management.Test.targets index 6c1af28b18c56..05fa16a985e59 100644 --- a/eng/Azure.Management.Test.targets +++ b/eng/Azure.Management.Test.targets @@ -4,8 +4,13 @@ $(MSBuildThisFileDirectory)/../sdk/testcommon/Azure.Graph.Rbac/src - - + + + + + diff --git a/sdk/core/Azure.Core.TestFramework/src/InstrumentClientInterceptor.cs b/sdk/core/Azure.Core.TestFramework/src/InstrumentClientInterceptor.cs index af1a4f3d71e6a..805d4cc2aa21d 100644 --- a/sdk/core/Azure.Core.TestFramework/src/InstrumentClientInterceptor.cs +++ b/sdk/core/Azure.Core.TestFramework/src/InstrumentClientInterceptor.cs @@ -29,7 +29,9 @@ public void Intercept(IInvocation invocation) // We don't want to instrument generated rest clients. if ((type.Name.EndsWith("Client") && !type.Name.EndsWith("RestClient")) || // Generated ARM clients will have a property containing the sub-client that ends with Operations. - (invocation.Method.Name.StartsWith("get_") && type.Name.EndsWith("Operations"))) + (invocation.Method.Name.StartsWith("get_") && type.Name.EndsWith("Operations")) || + // Instrument the subscription client that hangs off of the new AzureResouceManagementClient + (type.Name.EndsWith("DefaultSubscription"))) { invocation.ReturnValue = _testBase.InstrumentClient(type, result, Array.Empty()); } diff --git a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs index f5ca1cc05d8e1..86a18f6cffd1e 100644 --- a/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs +++ b/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs @@ -68,9 +68,10 @@ protected RecordedTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync) Mode = mode; } - public T InstrumentClientOptions(T clientOptions) where T : ClientOptions + public T InstrumentClientOptions(T clientOptions, TestRecording recording = default) where T : ClientOptions { - clientOptions.Transport = Recording.CreateTransport(clientOptions.Transport); + recording ??= Recording; + clientOptions.Transport = recording.CreateTransport(clientOptions.Transport); if (Mode == RecordedTestMode.Playback) { // Not making the timeout zero so retry code still goes async @@ -80,7 +81,7 @@ public T InstrumentClientOptions(T clientOptions) where T : ClientOptions return clientOptions; } - private string GetSessionFilePath() + protected string GetSessionFilePath() { TestContext.TestAdapter testAdapter = TestContext.CurrentContext.Test; @@ -141,7 +142,7 @@ public virtual void StartTestRecording() if (Mode != RecordedTestMode.Live && test.Properties.ContainsKey("SkipRecordings")) { - throw new IgnoreException((string) test.Properties.Get("SkipRecordings")); + throw new IgnoreException((string)test.Properties.Get("SkipRecordings")); } Recording = new TestRecording(Mode, GetSessionFilePath(), Sanitizer, Matcher); ValidateClientInstrumentation = Recording.HasRequests; diff --git a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs index b97bf1567d4e3..f1c0be4807219 100644 --- a/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs +++ b/sdk/core/Azure.Core.TestFramework/src/TestEnvironment.cs @@ -264,6 +264,11 @@ protected string GetOptionalVariable(string name) value = Environment.GetEnvironmentVariable(name); } + if (value == null) + { + value = Environment.GetEnvironmentVariable($"AZURE_{name}"); + } + if (value == null) { _environmentFile.TryGetValue(name, out value); diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/AzureResourceManagerClient.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/AzureResourceManagerClient.cs index 2772642ffc635..a9ea540215470 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/AzureResourceManagerClient.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/AzureResourceManagerClient.cs @@ -28,7 +28,6 @@ public class AzureResourceManagerClient /// Initializes a new instance of the class for mocking. /// protected AzureResourceManagerClient() - : this(null, null, new DefaultAzureCredential(), null) { } @@ -113,17 +112,17 @@ private AzureResourceManagerClient( /// /// Gets the Api version overrides. /// - public Dictionary ApiVersionOverrides { get; private set; } + public virtual Dictionary ApiVersionOverrides { get; private set; } /// /// Gets the default Azure subscription. /// - public Subscription DefaultSubscription { get; private set; } + public virtual Subscription DefaultSubscription { get; private set; } /// /// Gets the Azure resource manager client options. /// - internal AzureResourceManagerClientOptions ClientOptions { get; } + internal virtual AzureResourceManagerClientOptions ClientOptions { get; } /// /// Gets the Azure subscription operations. diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmBuilderTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmBuilderTests.cs deleted file mode 100644 index a7a2965b07a80..0000000000000 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmBuilderTests.cs +++ /dev/null @@ -1,43 +0,0 @@ -using NUnit.Framework; -using System; -using System.Text; -using System.Threading.Tasks; - -namespace Azure.ResourceManager.Core.Tests -{ - [Ignore("Waiting on ADO item: 5122")] - public class ArmBuilderTests - { - [TestCase(null)] - [TestCase(" ")] - public void TestCreateOrUpdate(string value) - { - var armClient = new AzureResourceManagerClient(); - Assert.Throws(delegate { armClient.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).CreateOrUpdate(value); }); - } - - [TestCase(null)] - [TestCase(" ")] - public void TestCreateOrUpdateAsync(string value) - { - var armClient = new AzureResourceManagerClient(); - Assert.ThrowsAsync(async delegate { await armClient.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).CreateOrUpdateAsync(value); }); - } - - [TestCase(null)] - [TestCase("")] - public void TestStartCreateOrUpdate(string value) - { - var armClient = new AzureResourceManagerClient(); - Assert.Throws(delegate { armClient.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).StartCreateOrUpdate(value); }); - } - - [TestCase(null)] - [TestCase(" ")] - public void TestStartCreateOrUpdateAsync(string value) - { - var armClient = new AzureResourceManagerClient(); - Assert.ThrowsAsync(async delegate { await armClient.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).StartCreateOrUpdateAsync(value); }); - } - } -} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Azure.ResourceManager.Core.Tests.csproj b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Azure.ResourceManager.Core.Tests.csproj index b45d1b35adf6c..9616364574dea 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Azure.ResourceManager.Core.Tests.csproj +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Azure.ResourceManager.Core.Tests.csproj @@ -3,6 +3,7 @@ $(DefineConstants);RESOURCES_RP ; + true SA1649;SA1633;SA1000;SA1028;SA1400;SA1508 @@ -16,17 +17,15 @@ - + Always - + Always - - Always - - + Always + diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ArmBuilderTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ArmBuilderTests.cs new file mode 100644 index 0000000000000..105ab26060012 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ArmBuilderTests.cs @@ -0,0 +1,38 @@ +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ArmBuilderTests : ResourceManagerTestBase + { + private AzureResourceManagerClient _client; + + public ArmBuilderTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + [SetUp] + public void SetUp() + { + _client = GetArmClient(); + } + + [TestCase(null)] + [TestCase(" ")] + [RecordedTest] + public void TestCreateOrUpdate(string value) + { + Assert.ThrowsAsync(async delegate { await _client.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).CreateOrUpdateAsync(value); }); + } + + [TestCase(null)] + [TestCase(" ")] + [RecordedTest] + public void TestStartCreateOrUpdate(string value) + { + Assert.ThrowsAsync(async delegate { await _client.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).StartCreateOrUpdateAsync(value); }); + } + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceManagerTestBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceManagerTestBase.cs new file mode 100644 index 0000000000000..3d2867fc944f6 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceManagerTestBase.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; +using Azure.ResourceManager.TestFramework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ResourceManagerTestBase : ManagementRecordedTestBase + { + protected ResourceManagerTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected ResourceManagerTestBase(bool isAsync) + : base(isAsync) + { + } + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceManagerTestEnvironment.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceManagerTestEnvironment.cs new file mode 100644 index 0000000000000..8d17b1bc0618c --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceManagerTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ResourceManagerTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs new file mode 100644 index 0000000000000..de40d23de3b52 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class SubscriptionOperationsTests : ResourceManagerTestBase + { + private AzureResourceManagerClient _client; + + public SubscriptionOperationsTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + [SetUp] + public void SetUp() + { + _client = GetArmClient(); + } + + [TestCase(null)] + [TestCase("")] + [SyncOnly] + [RecordedTest] + public void TestGetResourceGroupOpsArgNullException(string resourceGroupName) + { + var subOps = _client.DefaultSubscription; + Assert.Throws(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); + } + + [TestCase("te%st")] + [TestCase("test ")] + [TestCase("te$st")] + [TestCase("te#st")] + [TestCase("te#st")] + [SyncOnly] + [RecordedTest] + public void TestGetResourceGroupOpsArgException(string resourceGroupName) + { + var subOps = _client.DefaultSubscription; + Assert.Throws(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); + } + + [TestCase(91)] + [SyncOnly] + [RecordedTest] + public void TestGetResourceGroupOpsOutOfRangeArgException(int length) + { + var resourceGroupName = GetLongString(length); + var subOps = _client.DefaultSubscription; + Assert.Throws(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); + } + + [TestCase("te.st")] + [TestCase("te")] + [TestCase("t")] + [SyncOnly] + [RecordedTest] + public void TestGetResourceGroupOpsValid(string resourceGroupName) + { + var subOps = _client.DefaultSubscription; + Assert.DoesNotThrow(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); + } + + [TestCase(89)] + [TestCase(90)] + [SyncOnly] + [RecordedTest] + public void TestGetResourceGroupOpsLong(int length) + { + var resourceGroupName = GetLongString(length); + var subOps = _client.DefaultSubscription; + Assert.DoesNotThrow(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); + } + + private string GetLongString(int length) + { + StringBuilder builder = new StringBuilder(); + for(int i=0; i UpdateTags = new Dictionary { { "UpdateKey1", "UpdateValue1" }, { "UpdateKey2", "UpdateValue2" } }; + private static readonly IDictionary ExpectedAddTags = new Dictionary { { "key1", "value1" }, { "key2", "value2" }, { "UpdateKey3", "UpdateValue3" } }; private static readonly IDictionary OriTags = new Dictionary { { "key1", "value1" }, { "key2", "value2" } }; private ResourceGroup _rg; + private string _rgPrefix = "rg"; + + public TaggableResourceTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } [SetUp] - public void GlobalSetUp() + public async Task SetUpAsync() { - var armClient = new AzureResourceManagerClient(); - _rg = armClient.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).CreateOrUpdate($"{Environment.UserName}-rg-{Environment.TickCount}").Value; + var client = GetArmClient(); + _rg = await client.DefaultSubscription.GetResourceGroupContainer().Construct(LocationData.WestUS2).CreateOrUpdateAsync(Recording.GenerateAssetName(_rgPrefix)); _rg = _rg.AddTag("key1", "value1"); _rg = _rg.AddTag("key2", "value2"); } - [TearDown] - public void GlobalTearDown() - { - _rg.StartDelete(); - } - [Test] - public void TestSetTagsActivator() + [RecordedTest] + public async Task TestAddTags() { - var result = _rg.SetTags(UpdateTags); - Assert.AreEqual(result.Value.Data.Tags, UpdateTags); + var result = await _rg.AddTagAsync("UpdateKey3", "UpdateValue3"); + Assert.AreEqual(result.Value.Data.Tags, ExpectedAddTags); } [Test] - public async Task TestSetTagsAsyncActivator() + [RecordedTest] + public async Task TestStartAddTags() { - var result = await _rg.SetTagsAsync(UpdateTags); - Assert.AreEqual(result.Value.Data.Tags, UpdateTags); + var result = await (await _rg.StartAddTagAsync("UpdateKey3", "UpdateValue3")).WaitForCompletionAsync(); + Assert.AreEqual(result.Value.Data.Tags, ExpectedAddTags); } [Test] - public void TestStartSetTagsActivator() + [RecordedTest] + public async Task TestSetTags() { - var result = _rg.StartSetTags(UpdateTags).WaitForCompletionAsync().Result; + var result = await _rg.SetTagsAsync(UpdateTags); Assert.AreEqual(result.Value.Data.Tags, UpdateTags); } [Test] - public async Task TestStartSetTagsAsyncActivator() + [RecordedTest] + public async Task TestStartSetTags() { - var result = await _rg.StartSetTagsAsync(UpdateTags); + var result = await (await _rg.StartSetTagsAsync(UpdateTags)).WaitForCompletionAsync(); Assert.AreEqual(result.Value.Data.Tags, UpdateTags); } [TestCaseSource(nameof(TagSource))] - public void TestRemoveTagActivator(string key, IDictionary tags) - { - var result = _rg.RemoveTag(key); - Assert.AreEqual(result.Value.Data.Tags, tags); - } - - [TestCaseSource(nameof(TagSource))] - public async Task TestRemoveTagAsyncActivator(string key, IDictionary tags) + [RecordedTest] + public async Task TestRemoveTag(string key, IDictionary tags) { var result = await _rg.RemoveTagAsync(key); Assert.AreEqual(result.Value.Data.Tags, tags); } [TestCaseSource(nameof(TagSource))] - public void TestStartRemoveTagActivator(string key, IDictionary tags) - { - var result = _rg.StartRemoveTag(key).WaitForCompletionAsync().Result; - Assert.AreEqual(result.Value.Data.Tags, tags); - } - - [TestCaseSource(nameof(TagSource))] - public async Task TestStartRemoveTagAsyncActivator(string key, IDictionary tags) + [RecordedTest] + public async Task TestStartRemoveTag(string key, IDictionary tags) { - var result = await _rg.StartRemoveTagAsync(key); + var result = await (await _rg.StartRemoveTagAsync(key)).WaitForCompletionAsync(); Assert.AreEqual(result.Value.Data.Tags, tags); } diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(% %).json new file mode 100644 index 0000000000000..dd8a92cd6286f --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(% %).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "467d96640c6f7a9dd3f13da606dbf73a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a776376e-36aa-42c5-879a-87c7bbff8c16", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "a776376e-36aa-42c5-879a-87c7bbff8c16", + "x-ms-routing-request-id": "WESTUS2:20210305T005251Z:a776376e-36aa-42c5-879a-87c7bbff8c16" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "503930383", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(% %)Async.json new file mode 100644 index 0000000000000..a3168288be3ab --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(% %)Async.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "475df7d04c5768875297a306a78ccace", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "392c204d-aba9-4502-9479-72a6c3a33837", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "392c204d-aba9-4502-9479-72a6c3a33837", + "x-ms-routing-request-id": "WESTUS2:20210305T005254Z:392c204d-aba9-4502-9479-72a6c3a33837" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1635156179", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(null).json new file mode 100644 index 0000000000000..5e19b80ef2bb2 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(null).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "ea81ef1af96979f09100acb4b96934b1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4ce02395-dd77-47fc-b5b7-dd726ac7a3f0", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "4ce02395-dd77-47fc-b5b7-dd726ac7a3f0", + "x-ms-routing-request-id": "WESTUS2:20210305T005250Z:4ce02395-dd77-47fc-b5b7-dd726ac7a3f0" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "2037727193", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(null)Async.json new file mode 100644 index 0000000000000..bace041ab9f82 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestCreateOrUpdate(null)Async.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "20ba555d5846f95ae1860e4634d9c1b9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f33365a4-168a-43ac-ac4f-91e843fa481d", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "f33365a4-168a-43ac-ac4f-91e843fa481d", + "x-ms-routing-request-id": "WESTUS2:20210305T005253Z:f33365a4-168a-43ac-ac4f-91e843fa481d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "827106655", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(% %).json new file mode 100644 index 0000000000000..dea52c4229248 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(% %).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "e6a0a2e95c50321b4542313e38182698", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "06a130c8-630f-454c-b0e3-8949d4c03ebb", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "06a130c8-630f-454c-b0e3-8949d4c03ebb", + "x-ms-routing-request-id": "WESTUS2:20210305T005252Z:06a130c8-630f-454c-b0e3-8949d4c03ebb" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "2068325969", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(% %)Async.json new file mode 100644 index 0000000000000..51283627007ac --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(% %)Async.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "6f0853fc9350aa46fd3682a800b9d173", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a04b2f83-2f86-4496-b126-4d5268e6bbe3", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "a04b2f83-2f86-4496-b126-4d5268e6bbe3", + "x-ms-routing-request-id": "WESTUS2:20210305T005255Z:a04b2f83-2f86-4496-b126-4d5268e6bbe3" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1890380192", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(null).json new file mode 100644 index 0000000000000..ced944cea42ec --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(null).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "d11e18d654ee583cb0e82d445927b1cf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b82752f1-04bc-4ea1-8bfa-ba166c52af5b", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "b82752f1-04bc-4ea1-8bfa-ba166c52af5b", + "x-ms-routing-request-id": "WESTUS2:20210305T005251Z:b82752f1-04bc-4ea1-8bfa-ba166c52af5b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1379764053", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(null)Async.json new file mode 100644 index 0000000000000..f8fada6cb4de6 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ArmBuilderTests/TestStartCreateOrUpdate(null)Async.json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "e467d08a4bd2cca7203e920aac6d17df", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 00:52:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5269e206-3e2b-4123-b9b6-7ec61fc5f013", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "5269e206-3e2b-4123-b9b6-7ec61fc5f013", + "x-ms-routing-request-id": "WESTUS2:20210305T005254Z:5269e206-3e2b-4123-b9b6-7ec61fc5f013" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1014546522", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te#st%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te#st%).json new file mode 100644 index 0000000000000..08ac820b3a039 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te#st%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "ea56958505acc238fe794a2d27a85686", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "75ef0dd8-95dd-4f40-bc68-e8bee22cc340", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "75ef0dd8-95dd-4f40-bc68-e8bee22cc340", + "x-ms-routing-request-id": "WESTUS2:20210304T221724Z:75ef0dd8-95dd-4f40-bc68-e8bee22cc340" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1979975508", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te$st%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te$st%).json new file mode 100644 index 0000000000000..ccecf04ef1a86 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te$st%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "199b33c579d6aefa87c93c3861af4d61", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:22 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0eb698a6-4e88-4514-9e20-632acafec09b", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "0eb698a6-4e88-4514-9e20-632acafec09b", + "x-ms-routing-request-id": "WESTUS2:20210304T221722Z:0eb698a6-4e88-4514-9e20-632acafec09b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1710569629", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te%st%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te%st%).json new file mode 100644 index 0000000000000..66ef2e58955ef --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te%st%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "57c74b10d17b50f15940ea0884f306c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "674daaeb-3747-43c0-8ba6-97b40fe56d6e", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "674daaeb-3747-43c0-8ba6-97b40fe56d6e", + "x-ms-routing-request-id": "WESTUS2:20210304T221720Z:674daaeb-3747-43c0-8ba6-97b40fe56d6e" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "2045356497", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%test %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%test %).json new file mode 100644 index 0000000000000..7b4d9cccfd2b1 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%test %).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "d1c1d8a6a8e495fbc65f419f015bff71", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:21 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6b5982ba-4146-4128-a54d-d784eb07fb01", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "6b5982ba-4146-4128-a54d-d784eb07fb01", + "x-ms-routing-request-id": "WESTUS2:20210304T221721Z:6b5982ba-4146-4128-a54d-d784eb07fb01" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1253891996", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(%%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(%%).json new file mode 100644 index 0000000000000..ba395ccf7ce82 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(%%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "28d7b8ad1a54ce0652549b6a5f99d225", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8261cfbe-42a0-495e-9e92-2979874f456c", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "8261cfbe-42a0-495e-9e92-2979874f456c", + "x-ms-routing-request-id": "WESTUS2:20210304T221725Z:8261cfbe-42a0-495e-9e92-2979874f456c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1307830502", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null).json new file mode 100644 index 0000000000000..f5487a5c019ef --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "01e6d8525cf66fa8cd559809dd13cae0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "50a53369-9edb-463d-adf2-d483984dcd1b", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "50a53369-9edb-463d-adf2-d483984dcd1b", + "x-ms-routing-request-id": "WESTUS2:20210304T221725Z:50a53369-9edb-463d-adf2-d483984dcd1b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "2115711913", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89).json new file mode 100644 index 0000000000000..4ceb305219c6d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "c58d547f528241f50c1a1ccd63a62005", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:26 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c27edb50-0f9c-46aa-b5b5-61b96ef497c8", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "c27edb50-0f9c-46aa-b5b5-61b96ef497c8", + "x-ms-routing-request-id": "WESTUS2:20210304T221726Z:c27edb50-0f9c-46aa-b5b5-61b96ef497c8" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "155668133", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90).json new file mode 100644 index 0000000000000..70074e4a670a1 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "5028d6f19b001f95ea1d0c6bc5f2da9a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:27 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c93adb6b-c720-4e7f-8ee0-d992a5d7981c", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "c93adb6b-c720-4e7f-8ee0-d992a5d7981c", + "x-ms-routing-request-id": "WESTUS2:20210304T221727Z:c93adb6b-c720-4e7f-8ee0-d992a5d7981c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1031501803", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91).json new file mode 100644 index 0000000000000..0c8c75c6394d5 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "ef9767a56046f5b135c223c111880a97", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:28 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "94f13e29-0a3c-4b98-8cba-76bd47b43080", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "94f13e29-0a3c-4b98-8cba-76bd47b43080", + "x-ms-routing-request-id": "WESTUS2:20210304T221728Z:94f13e29-0a3c-4b98-8cba-76bd47b43080" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1532791965", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%).json new file mode 100644 index 0000000000000..4a4d1b1984bc2 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "c667b5ea94692fdf8bcc822d1258f39a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:30 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2f9f1d29-ee87-4fb0-a641-feab80166ffe", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "2f9f1d29-ee87-4fb0-a641-feab80166ffe", + "x-ms-routing-request-id": "WESTUS2:20210304T221730Z:2f9f1d29-ee87-4fb0-a641-feab80166ffe" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1286893929", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%).json new file mode 100644 index 0000000000000..87305eeb6b85d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "f4b2532a06941ba2141073373e5eea74", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8b3a3b86-66dc-4ea8-884d-7671f02ecf29", + "x-ms-ratelimit-remaining-subscription-reads": "11986", + "x-ms-request-id": "8b3a3b86-66dc-4ea8-884d-7671f02ecf29", + "x-ms-routing-request-id": "WESTUS2:20210304T221730Z:8b3a3b86-66dc-4ea8-884d-7671f02ecf29" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1017488050", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te.st%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te.st%).json new file mode 100644 index 0000000000000..69fadb612ceb0 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te.st%).json @@ -0,0 +1,49 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "57a27a700719b782466a84333b7e9d64", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:17:29 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "11cbb239-6d93-466f-b34e-b58a02e5b0ba", + "x-ms-ratelimit-remaining-subscription-reads": "11987", + "x-ms-request-id": "11cbb239-6d93-466f-b34e-b58a02e5b0ba", + "x-ms-routing-request-id": "WESTUS2:20210304T221729Z:11cbb239-6d93-466f-b34e-b58a02e5b0ba" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + } + ], + "Variables": { + "RandomSeed": "1638097707", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestAddTags.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestAddTags.json new file mode 100644 index 0000000000000..60a15693e1cd6 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestAddTags.json @@ -0,0 +1,232 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "fe0f5412fe83e8d64f667f6d1a000787", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 02:52:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2488b052-6e9d-450b-ab69-2beb7b8fc780", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "2488b052-6e9d-450b-ab69-2beb7b8fc780", + "x-ms-routing-request-id": "WESTUS2:20210305T025245Z:2488b052-6e9d-450b-ab69-2beb7b8fc780" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5701?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": "a059d135fd3810dd697d34384296e526", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 02:52:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "08d4d452-b65a-4301-85fc-4c4c10b8d917", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "08d4d452-b65a-4301-85fc-4c4c10b8d917", + "x-ms-routing-request-id": "WESTUS2:20210305T025247Z:08d4d452-b65a-4301-85fc-4c4c10b8d917" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5701", + "name": "rg5701", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5701?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "6b580f381d4cd2e11c85894c7578a2ee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 02:52:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "226fa8d9-4f3a-44b7-a572-0b6c68c8a4ce", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "226fa8d9-4f3a-44b7-a572-0b6c68c8a4ce", + "x-ms-routing-request-id": "WESTUS2:20210305T025247Z:226fa8d9-4f3a-44b7-a572-0b6c68c8a4ce" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5701", + "name": "rg5701", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5701?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "36d36beb5ac857d932ee1a81a2af0cd0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 02:52:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "68edfc97-2cea-4b0d-815d-e98eff0bd212", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "68edfc97-2cea-4b0d-815d-e98eff0bd212", + "x-ms-routing-request-id": "WESTUS2:20210305T025247Z:68edfc97-2cea-4b0d-815d-e98eff0bd212" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5701", + "name": "rg5701", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5701?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "70", + "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": "2eb2b979b196cf3f8fbc4741d527e3a1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 05 Mar 2021 02:52:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ed7c2176-d05c-4250-b82f-55522500c167", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "ed7c2176-d05c-4250-b82f-55522500c167", + "x-ms-routing-request-id": "WESTUS2:20210305T025248Z:ed7c2176-d05c-4250-b82f-55522500c167" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5701", + "name": "rg5701", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "907506108", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestAddTagsAsync.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestAddTagsAsync.json new file mode 100644 index 0000000000000..cf6717273363c --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestAddTagsAsync.json @@ -0,0 +1,232 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "80bf6f08a1f40f849042acf3263101ca", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1d841604-337d-4194-9d36-4e0134585f2d", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "1d841604-337d-4194-9d36-4e0134585f2d", + "x-ms-routing-request-id": "WESTUS2:20210304T225853Z:1d841604-337d-4194-9d36-4e0134585f2d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2616?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": "a41991e5a5adf27672281b20fb652a83", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2a58a933-c8c8-40b0-8f5c-4234c90cd243", + "x-ms-ratelimit-remaining-subscription-writes": "1159", + "x-ms-request-id": "2a58a933-c8c8-40b0-8f5c-4234c90cd243", + "x-ms-routing-request-id": "WESTUS2:20210304T225854Z:2a58a933-c8c8-40b0-8f5c-4234c90cd243" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2616", + "name": "rg2616", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2616?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "963787ebb692ac455c591c49d3f0c750", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "db932993-dd60-43d5-ac64-5e7139c61b67", + "x-ms-ratelimit-remaining-subscription-writes": "1158", + "x-ms-request-id": "db932993-dd60-43d5-ac64-5e7139c61b67", + "x-ms-routing-request-id": "WESTUS2:20210304T225854Z:db932993-dd60-43d5-ac64-5e7139c61b67" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2616", + "name": "rg2616", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2616?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "c14218501a92ca5a498d817869ef95dc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8e4c3901-d20c-44f1-9653-0faa16b6474c", + "x-ms-ratelimit-remaining-subscription-writes": "1157", + "x-ms-request-id": "8e4c3901-d20c-44f1-9653-0faa16b6474c", + "x-ms-routing-request-id": "WESTUS2:20210304T225854Z:8e4c3901-d20c-44f1-9653-0faa16b6474c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2616", + "name": "rg2616", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2616?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "70", + "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": "aa3a6f8234ca2f644b6d4854882c1f81", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "95a8b843-56c5-4338-889f-e84d4e9b8423", + "x-ms-ratelimit-remaining-subscription-writes": "1156", + "x-ms-request-id": "95a8b843-56c5-4338-889f-e84d4e9b8423", + "x-ms-routing-request-id": "WESTUS2:20210304T225855Z:95a8b843-56c5-4338-889f-e84d4e9b8423" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2616", + "name": "rg2616", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "2096390341", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json new file mode 100644 index 0000000000000..40012cb278b96 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "130b15db0ee7c47a0bd47ce240a0248c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b29e379e-9add-4f62-b7ff-da58cb19171b", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "b29e379e-9add-4f62-b7ff-da58cb19171b", + "x-ms-routing-request-id": "WESTUS2:20210304T225843Z:b29e379e-9add-4f62-b7ff-da58cb19171b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8350?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": "fb6960a7ddbf2b823a20f76a9d544aa8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a5c3d5e7-9ced-4092-a9f2-c6fe5167dd46", + "x-ms-ratelimit-remaining-subscription-writes": "1175", + "x-ms-request-id": "a5c3d5e7-9ced-4092-a9f2-c6fe5167dd46", + "x-ms-routing-request-id": "WESTUS2:20210304T225844Z:a5c3d5e7-9ced-4092-a9f2-c6fe5167dd46" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8350", + "name": "rg8350", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8350?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "65cc81cf1b0d295255bef47f8570ca05", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d73be328-4ccd-46e4-8953-8bd2b0aaed5b", + "x-ms-ratelimit-remaining-subscription-writes": "1174", + "x-ms-request-id": "d73be328-4ccd-46e4-8953-8bd2b0aaed5b", + "x-ms-routing-request-id": "WESTUS2:20210304T225844Z:d73be328-4ccd-46e4-8953-8bd2b0aaed5b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8350", + "name": "rg8350", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8350?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "409f459a154f381b88e8aced825a6d7f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ab373f71-4a93-4639-833f-0975e084d5d9", + "x-ms-ratelimit-remaining-subscription-writes": "1173", + "x-ms-request-id": "ab373f71-4a93-4639-833f-0975e084d5d9", + "x-ms-routing-request-id": "WESTUS2:20210304T225845Z:ab373f71-4a93-4639-833f-0975e084d5d9" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8350", + "name": "rg8350", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8350?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "1f70393227578cc60d40a600e902a5ca", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:44 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a38efac6-19bf-4ad7-8ada-bedee5701ffa", + "x-ms-ratelimit-remaining-subscription-writes": "1172", + "x-ms-request-id": "a38efac6-19bf-4ad7-8ada-bedee5701ffa", + "x-ms-routing-request-id": "WESTUS2:20210304T225845Z:a38efac6-19bf-4ad7-8ada-bedee5701ffa" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8350", + "name": "rg8350", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "1977659092", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json new file mode 100644 index 0000000000000..6945b87305123 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "115949ef5ba4488102482d83ed421716", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6da9b1f2-52a9-4989-8d6d-77b072f16db2", + "x-ms-ratelimit-remaining-subscription-reads": "11979", + "x-ms-request-id": "6da9b1f2-52a9-4989-8d6d-77b072f16db2", + "x-ms-routing-request-id": "WESTUS2:20210304T225907Z:6da9b1f2-52a9-4989-8d6d-77b072f16db2" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2981?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": "1f27ed888bd2f54fded16d147cb1c6e4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d3e720ff-7138-431a-889b-6274ca04c027", + "x-ms-ratelimit-remaining-subscription-writes": "1135", + "x-ms-request-id": "d3e720ff-7138-431a-889b-6274ca04c027", + "x-ms-routing-request-id": "WESTUS2:20210304T225907Z:d3e720ff-7138-431a-889b-6274ca04c027" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2981", + "name": "rg2981", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2981?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "c750f68cbbfdbcab68fa5d13ba0bec1d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a0b492ae-de9e-4df3-9072-99edc1d3c031", + "x-ms-ratelimit-remaining-subscription-writes": "1134", + "x-ms-request-id": "a0b492ae-de9e-4df3-9072-99edc1d3c031", + "x-ms-routing-request-id": "WESTUS2:20210304T225908Z:a0b492ae-de9e-4df3-9072-99edc1d3c031" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2981", + "name": "rg2981", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2981?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "546966b9eb2bbd1c0a1bc68a14348697", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8f98a0b6-d3a8-42dc-b7ab-cf00028cc895", + "x-ms-ratelimit-remaining-subscription-writes": "1133", + "x-ms-request-id": "8f98a0b6-d3a8-42dc-b7ab-cf00028cc895", + "x-ms-routing-request-id": "WESTUS2:20210304T225908Z:8f98a0b6-d3a8-42dc-b7ab-cf00028cc895" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2981", + "name": "rg2981", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2981?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "4b609e674fc7cc8f416ab7d82e3c3bd2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e9d39870-6696-433e-b10a-dcd550552d45", + "x-ms-ratelimit-remaining-subscription-writes": "1132", + "x-ms-request-id": "e9d39870-6696-433e-b10a-dcd550552d45", + "x-ms-routing-request-id": "WESTUS2:20210304T225908Z:e9d39870-6696-433e-b10a-dcd550552d45" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2981", + "name": "rg2981", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "1793413372", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json new file mode 100644 index 0000000000000..6995b391a8045 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "1d2c673714e4c522206d9c20b0f922ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:38 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cd51cec6-d75d-4cd4-8af6-86d7f59bc6ae", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "cd51cec6-d75d-4cd4-8af6-86d7f59bc6ae", + "x-ms-routing-request-id": "WESTUS2:20210304T225839Z:cd51cec6-d75d-4cd4-8af6-86d7f59bc6ae" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4896?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": "4053a89af29c1eb9cfc8bad530a0a039", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7a98847c-aa2a-4e83-96c2-90e757e692c3", + "x-ms-ratelimit-remaining-subscription-writes": "1183", + "x-ms-request-id": "7a98847c-aa2a-4e83-96c2-90e757e692c3", + "x-ms-routing-request-id": "WESTUS2:20210304T225839Z:7a98847c-aa2a-4e83-96c2-90e757e692c3" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4896", + "name": "rg4896", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4896?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "cd7e26eca9308cd37717139c809f48a1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "318d887a-62a1-4acd-a7af-0507e6ec6f78", + "x-ms-ratelimit-remaining-subscription-writes": "1182", + "x-ms-request-id": "318d887a-62a1-4acd-a7af-0507e6ec6f78", + "x-ms-routing-request-id": "WESTUS2:20210304T225840Z:318d887a-62a1-4acd-a7af-0507e6ec6f78" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4896", + "name": "rg4896", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4896?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "3a26c6834aca749a72fe144b68eff0cc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fb7115af-2767-4861-9ed2-3d5fd22c26ce", + "x-ms-ratelimit-remaining-subscription-writes": "1181", + "x-ms-request-id": "fb7115af-2767-4861-9ed2-3d5fd22c26ce", + "x-ms-routing-request-id": "WESTUS2:20210304T225840Z:fb7115af-2767-4861-9ed2-3d5fd22c26ce" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4896", + "name": "rg4896", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4896?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "d2c3e6fbdda3f11ad5c7c984df1d9e2f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:40 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "11cb1b7c-7257-41ac-b6b5-db9aad6e688f", + "x-ms-ratelimit-remaining-subscription-writes": "1180", + "x-ms-request-id": "11cb1b7c-7257-41ac-b6b5-db9aad6e688f", + "x-ms-routing-request-id": "WESTUS2:20210304T225840Z:11cb1b7c-7257-41ac-b6b5-db9aad6e688f" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4896", + "name": "rg4896", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "890877712", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json new file mode 100644 index 0000000000000..bd539aef1dd6d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "f796edbbf8a73d2a37a450f42470ee3c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7aed7052-a691-436f-837a-cb3f4960a16c", + "x-ms-ratelimit-remaining-subscription-reads": "11981", + "x-ms-request-id": "7aed7052-a691-436f-837a-cb3f4960a16c", + "x-ms-routing-request-id": "WESTUS2:20210304T225902Z:7aed7052-a691-436f-837a-cb3f4960a16c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8711?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": "49a5635b794b9ba4c0b526745548016e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d81d15e7-fd27-48f9-81df-96756a32e482", + "x-ms-ratelimit-remaining-subscription-writes": "1143", + "x-ms-request-id": "d81d15e7-fd27-48f9-81df-96756a32e482", + "x-ms-routing-request-id": "WESTUS2:20210304T225903Z:d81d15e7-fd27-48f9-81df-96756a32e482" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8711", + "name": "rg8711", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8711?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "eeeaf630d68e515a5a3f5ae0a1ab4b5a", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "93987937-306f-4582-9f78-85a40ace0597", + "x-ms-ratelimit-remaining-subscription-writes": "1142", + "x-ms-request-id": "93987937-306f-4582-9f78-85a40ace0597", + "x-ms-routing-request-id": "WESTUS2:20210304T225903Z:93987937-306f-4582-9f78-85a40ace0597" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8711", + "name": "rg8711", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8711?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "022061560241746ff25ce74203c8e25c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "72c715ec-c045-4746-b715-b5bb3393d7d1", + "x-ms-ratelimit-remaining-subscription-writes": "1141", + "x-ms-request-id": "72c715ec-c045-4746-b715-b5bb3393d7d1", + "x-ms-routing-request-id": "WESTUS2:20210304T225903Z:72c715ec-c045-4746-b715-b5bb3393d7d1" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8711", + "name": "rg8711", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8711?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "7af3864f4e0485810953ef0c1fc3f914", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "01a20dea-f1c5-444f-a0fb-5d66384e83c7", + "x-ms-ratelimit-remaining-subscription-writes": "1140", + "x-ms-request-id": "01a20dea-f1c5-444f-a0fb-5d66384e83c7", + "x-ms-routing-request-id": "WESTUS2:20210304T225904Z:01a20dea-f1c5-444f-a0fb-5d66384e83c7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8711", + "name": "rg8711", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "1552034999", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json new file mode 100644 index 0000000000000..0740bc76cb4ef --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "19451a0677cb7e4dd4b120aa31a71492", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e1cd2088-8560-43d5-aaf6-7d5838616dd7", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "e1cd2088-8560-43d5-aaf6-7d5838616dd7", + "x-ms-routing-request-id": "WESTUS2:20210304T225841Z:e1cd2088-8560-43d5-aaf6-7d5838616dd7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5165?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": "ec46696f45c7cd368c747f3942cb9e1e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d702df14-aac2-489f-8256-95ee20d6530b", + "x-ms-ratelimit-remaining-subscription-writes": "1179", + "x-ms-request-id": "d702df14-aac2-489f-8256-95ee20d6530b", + "x-ms-routing-request-id": "WESTUS2:20210304T225842Z:d702df14-aac2-489f-8256-95ee20d6530b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5165", + "name": "rg5165", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5165?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "10797d77bb5d40c2a44c23c398d3dd45", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:41 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6ebc6311-1f61-45e4-8336-11d8d8a64ab5", + "x-ms-ratelimit-remaining-subscription-writes": "1178", + "x-ms-request-id": "6ebc6311-1f61-45e4-8336-11d8d8a64ab5", + "x-ms-routing-request-id": "WESTUS2:20210304T225842Z:6ebc6311-1f61-45e4-8336-11d8d8a64ab5" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5165", + "name": "rg5165", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5165?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "ddd0f96850ecd43f0f4c3e03cd4492e5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "32509a59-5029-45d0-8367-ca1f48ea4a85", + "x-ms-ratelimit-remaining-subscription-writes": "1177", + "x-ms-request-id": "32509a59-5029-45d0-8367-ca1f48ea4a85", + "x-ms-routing-request-id": "WESTUS2:20210304T225842Z:32509a59-5029-45d0-8367-ca1f48ea4a85" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5165", + "name": "rg5165", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5165?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "2ab98b81819bb3cda606477a227234b8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:42 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0f90870d-f94e-4d95-834f-168c2ed32f8a", + "x-ms-ratelimit-remaining-subscription-writes": "1176", + "x-ms-request-id": "0f90870d-f94e-4d95-834f-168c2ed32f8a", + "x-ms-routing-request-id": "WESTUS2:20210304T225842Z:0f90870d-f94e-4d95-834f-168c2ed32f8a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5165", + "name": "rg5165", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "921476488", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json new file mode 100644 index 0000000000000..ee67f9135ff27 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "bf041884cc34453642d5b58dd606250f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:03 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "50c84837-0447-4a9e-a218-e41721a17d86", + "x-ms-ratelimit-remaining-subscription-reads": "11980", + "x-ms-request-id": "50c84837-0447-4a9e-a218-e41721a17d86", + "x-ms-routing-request-id": "WESTUS2:20210304T225904Z:50c84837-0447-4a9e-a218-e41721a17d86" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg7723?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": "ea845b278ed6ca969598d516417d2b71", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "94901ab2-4178-4255-a9d3-5739ca848c07", + "x-ms-ratelimit-remaining-subscription-writes": "1139", + "x-ms-request-id": "94901ab2-4178-4255-a9d3-5739ca848c07", + "x-ms-routing-request-id": "WESTUS2:20210304T225905Z:94901ab2-4178-4255-a9d3-5739ca848c07" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg7723", + "name": "rg7723", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg7723?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "59904c322d54bb8efb29993560f2feb6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:04 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "03a0bb0f-bf47-45d7-ad27-b6ff8bb59783", + "x-ms-ratelimit-remaining-subscription-writes": "1138", + "x-ms-request-id": "03a0bb0f-bf47-45d7-ad27-b6ff8bb59783", + "x-ms-routing-request-id": "WESTUS2:20210304T225905Z:03a0bb0f-bf47-45d7-ad27-b6ff8bb59783" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg7723", + "name": "rg7723", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg7723?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "d254c812a1da89ae6ef49e34612e0057", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7aff6749-1b27-4ba4-ab7e-1c9150a94b61", + "x-ms-ratelimit-remaining-subscription-writes": "1137", + "x-ms-request-id": "7aff6749-1b27-4ba4-ab7e-1c9150a94b61", + "x-ms-routing-request-id": "WESTUS2:20210304T225906Z:7aff6749-1b27-4ba4-ab7e-1c9150a94b61" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg7723", + "name": "rg7723", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg7723?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "b9a41b89b595f9a1cdc8eeacf56169a2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b7c04df5-0f86-4352-b6e1-29315045bd41", + "x-ms-ratelimit-remaining-subscription-writes": "1136", + "x-ms-request-id": "b7c04df5-0f86-4352-b6e1-29315045bd41", + "x-ms-routing-request-id": "WESTUS2:20210304T225906Z:b7c04df5-0f86-4352-b6e1-29315045bd41" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg7723", + "name": "rg7723", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "692618239", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestSetTags.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestSetTags.json new file mode 100644 index 0000000000000..40023a60709ec --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestSetTags.json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "b3c7cf7cae8f18ad2537dd8f1a75e9e6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d78cbcb7-b2eb-411d-b0eb-401d134e86eb", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "d78cbcb7-b2eb-411d-b0eb-401d134e86eb", + "x-ms-routing-request-id": "WESTUS2:20210304T225832Z:d78cbcb7-b2eb-411d-b0eb-401d134e86eb" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9936?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": "20f28ffc1d8624d948386451c3337eff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1a0e954b-e0d7-441a-aaa8-844d96dfc642", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "1a0e954b-e0d7-441a-aaa8-844d96dfc642", + "x-ms-routing-request-id": "WESTUS2:20210304T225832Z:1a0e954b-e0d7-441a-aaa8-844d96dfc642" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9936", + "name": "rg9936", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9936?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "2fa84c25224e728ad83920899b1cf57e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:32 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "52fb1671-8958-4875-aac4-65b83529e950", + "x-ms-ratelimit-remaining-subscription-writes": "1194", + "x-ms-request-id": "52fb1671-8958-4875-aac4-65b83529e950", + "x-ms-routing-request-id": "WESTUS2:20210304T225833Z:52fb1671-8958-4875-aac4-65b83529e950" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9936", + "name": "rg9936", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9936?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "f5c3384f3f29b1f6ee8f477548c66204", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c5ddabcb-bbc9-4a46-aaad-24125be63d0e", + "x-ms-ratelimit-remaining-subscription-writes": "1193", + "x-ms-request-id": "c5ddabcb-bbc9-4a46-aaad-24125be63d0e", + "x-ms-routing-request-id": "WESTUS2:20210304T225833Z:c5ddabcb-bbc9-4a46-aaad-24125be63d0e" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9936", + "name": "rg9936", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9936?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "66", + "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": "28f48f5fb740daa2057f474dfd50892c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "275", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:33 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b434749b-dcbd-45b6-b1c2-e15d81d3cd54", + "x-ms-ratelimit-remaining-subscription-writes": "1192", + "x-ms-request-id": "b434749b-dcbd-45b6-b1c2-e15d81d3cd54", + "x-ms-routing-request-id": "WESTUS2:20210304T225833Z:b434749b-dcbd-45b6-b1c2-e15d81d3cd54" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9936", + "name": "rg9936", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "1202156737", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestSetTagsAsync.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestSetTagsAsync.json new file mode 100644 index 0000000000000..3ba67e97b4d1c --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestSetTagsAsync.json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "8a79601e043b2d87ac8ffa704664d35b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b657bb74-f719-48ff-b6d2-01e775f688c0", + "x-ms-ratelimit-remaining-subscription-reads": "11984", + "x-ms-request-id": "b657bb74-f719-48ff-b6d2-01e775f688c0", + "x-ms-routing-request-id": "WESTUS2:20210304T225855Z:b657bb74-f719-48ff-b6d2-01e775f688c0" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9185?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": "3d8b48cd69c815465a6b49d7f4aaa184", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a772b459-e588-471b-8a47-03bbd6c043f6", + "x-ms-ratelimit-remaining-subscription-writes": "1155", + "x-ms-request-id": "a772b459-e588-471b-8a47-03bbd6c043f6", + "x-ms-routing-request-id": "WESTUS2:20210304T225856Z:a772b459-e588-471b-8a47-03bbd6c043f6" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9185", + "name": "rg9185", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9185?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "aec44c796376daebe0b590d02e30b02f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:55 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6b4df165-f7e5-4594-a01d-5e5b6b57ea10", + "x-ms-ratelimit-remaining-subscription-writes": "1154", + "x-ms-request-id": "6b4df165-f7e5-4594-a01d-5e5b6b57ea10", + "x-ms-routing-request-id": "WESTUS2:20210304T225856Z:6b4df165-f7e5-4594-a01d-5e5b6b57ea10" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9185", + "name": "rg9185", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9185?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "2ec1b74ccdfbf7553275e1993e55b8e4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e1d61c5c-7981-4ec2-9deb-18f81bdf7fbc", + "x-ms-ratelimit-remaining-subscription-writes": "1153", + "x-ms-request-id": "e1d61c5c-7981-4ec2-9deb-18f81bdf7fbc", + "x-ms-routing-request-id": "WESTUS2:20210304T225857Z:e1d61c5c-7981-4ec2-9deb-18f81bdf7fbc" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9185", + "name": "rg9185", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg9185?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "66", + "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": "17ccec59ad0f698c5cb05d12d976e629", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "275", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1fe6cf28-b855-4b2b-9236-72c4ea978712", + "x-ms-ratelimit-remaining-subscription-writes": "1152", + "x-ms-request-id": "1fe6cf28-b855-4b2b-9236-72c4ea978712", + "x-ms-routing-request-id": "WESTUS2:20210304T225857Z:1fe6cf28-b855-4b2b-9236-72c4ea978712" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg9185", + "name": "rg9185", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "209861493", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartAddTags.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartAddTags.json new file mode 100644 index 0000000000000..d8b3b873f1e14 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartAddTags.json @@ -0,0 +1,232 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "8f090788fce317369d006ae1ab559622", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5cf96915-ec9b-4854-b0e3-058f81729e71", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "5cf96915-ec9b-4854-b0e3-058f81729e71", + "x-ms-routing-request-id": "WESTUS2:20210304T225834Z:5cf96915-ec9b-4854-b0e3-058f81729e71" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg1439?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": "eb77baf501f54b5604c9e4aa496689e2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "eb791308-46a6-4854-80ef-0165a285a064", + "x-ms-ratelimit-remaining-subscription-writes": "1191", + "x-ms-request-id": "eb791308-46a6-4854-80ef-0165a285a064", + "x-ms-routing-request-id": "WESTUS2:20210304T225835Z:eb791308-46a6-4854-80ef-0165a285a064" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg1439", + "name": "rg1439", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg1439?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "998148c0e6daed8d0fef57f18ff119ef", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:34 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c476c015-b24a-4b96-9a2d-01f41e9bcedc", + "x-ms-ratelimit-remaining-subscription-writes": "1190", + "x-ms-request-id": "c476c015-b24a-4b96-9a2d-01f41e9bcedc", + "x-ms-routing-request-id": "WESTUS2:20210304T225835Z:c476c015-b24a-4b96-9a2d-01f41e9bcedc" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg1439", + "name": "rg1439", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg1439?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "2bb900e234140592b343de33526d5399", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:35 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ce989b10-39a3-452f-9bd3-2ed99eb8ce89", + "x-ms-ratelimit-remaining-subscription-writes": "1189", + "x-ms-request-id": "ce989b10-39a3-452f-9bd3-2ed99eb8ce89", + "x-ms-routing-request-id": "WESTUS2:20210304T225835Z:ce989b10-39a3-452f-9bd3-2ed99eb8ce89" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg1439", + "name": "rg1439", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg1439?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "70", + "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": "0deaffe089140e6f2d8adb05aa65bc13", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:35 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "47d34c86-41be-4d66-8056-3b202658dc10", + "x-ms-ratelimit-remaining-subscription-writes": "1188", + "x-ms-request-id": "47d34c86-41be-4d66-8056-3b202658dc10", + "x-ms-routing-request-id": "WESTUS2:20210304T225835Z:47d34c86-41be-4d66-8056-3b202658dc10" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg1439", + "name": "rg1439", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "2115680116", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartAddTagsAsync.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartAddTagsAsync.json new file mode 100644 index 0000000000000..4b28af67f55dc --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartAddTagsAsync.json @@ -0,0 +1,232 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "447e676b783102726ade6637a0c158ff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "74ba1cf6-4f56-4f55-a4f3-60be8170a764", + "x-ms-ratelimit-remaining-subscription-reads": "11983", + "x-ms-request-id": "74ba1cf6-4f56-4f55-a4f3-60be8170a764", + "x-ms-routing-request-id": "WESTUS2:20210304T225858Z:74ba1cf6-4f56-4f55-a4f3-60be8170a764" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4838?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": "8a2c134c254964ac071837f431426609", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fce89a6f-1c41-42a1-a777-23d3e774e0c4", + "x-ms-ratelimit-remaining-subscription-writes": "1151", + "x-ms-request-id": "fce89a6f-1c41-42a1-a777-23d3e774e0c4", + "x-ms-routing-request-id": "WESTUS2:20210304T225858Z:fce89a6f-1c41-42a1-a777-23d3e774e0c4" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4838", + "name": "rg4838", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4838?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "63d69bce26e3f79da32b8c0cd3e48088", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "066a39a2-1dcb-4f5a-a59a-dc1795fdcc6a", + "x-ms-ratelimit-remaining-subscription-writes": "1150", + "x-ms-request-id": "066a39a2-1dcb-4f5a-a59a-dc1795fdcc6a", + "x-ms-routing-request-id": "WESTUS2:20210304T225859Z:066a39a2-1dcb-4f5a-a59a-dc1795fdcc6a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4838", + "name": "rg4838", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4838?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "b62af8dc69954222d1e0295f3b0e389c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d7288fed-cc7a-4ebe-a523-e3998f9ea7b1", + "x-ms-ratelimit-remaining-subscription-writes": "1149", + "x-ms-request-id": "d7288fed-cc7a-4ebe-a523-e3998f9ea7b1", + "x-ms-routing-request-id": "WESTUS2:20210304T225859Z:d7288fed-cc7a-4ebe-a523-e3998f9ea7b1" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4838", + "name": "rg4838", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg4838?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "70", + "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": "25d12eff9b8226f47634e71e98a09022", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "279", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3a215aaa-fb01-4a8b-84bf-9f02d00c9f31", + "x-ms-ratelimit-remaining-subscription-writes": "1148", + "x-ms-request-id": "3a215aaa-fb01-4a8b-84bf-9f02d00c9f31", + "x-ms-routing-request-id": "WESTUS2:20210304T225859Z:3a215aaa-fb01-4a8b-84bf-9f02d00c9f31" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg4838", + "name": "rg4838", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2", + "UpdateKey3": "UpdateValue3" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "884409656", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json new file mode 100644 index 0000000000000..0b261a2d3a69e --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "81d11e498feeb67ebeadaea71f543ecd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d38321f4-9674-40fd-ba3c-c79ea804bbe6", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "d38321f4-9674-40fd-ba3c-c79ea804bbe6", + "x-ms-routing-request-id": "WESTUS2:20210304T225851Z:d38321f4-9674-40fd-ba3c-c79ea804bbe6" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2842?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": "a50aeeddebb826ab444a4bd5700d7f3c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "958c7ed9-6886-4f8c-a73d-999b6a25d8c6", + "x-ms-ratelimit-remaining-subscription-writes": "1163", + "x-ms-request-id": "958c7ed9-6886-4f8c-a73d-999b6a25d8c6", + "x-ms-routing-request-id": "WESTUS2:20210304T225851Z:958c7ed9-6886-4f8c-a73d-999b6a25d8c6" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2842", + "name": "rg2842", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2842?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "324223b9ff970f428b1ba4b3bd592f77", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2fe6b68e-4de7-48d9-b725-47a966333115", + "x-ms-ratelimit-remaining-subscription-writes": "1162", + "x-ms-request-id": "2fe6b68e-4de7-48d9-b725-47a966333115", + "x-ms-routing-request-id": "WESTUS2:20210304T225851Z:2fe6b68e-4de7-48d9-b725-47a966333115" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2842", + "name": "rg2842", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2842?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "b33fedec0faa3291255aaa4532e04d9f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a67f3d35-090a-43da-ba0d-ba3f6ad3cf9a", + "x-ms-ratelimit-remaining-subscription-writes": "1161", + "x-ms-request-id": "a67f3d35-090a-43da-ba0d-ba3f6ad3cf9a", + "x-ms-routing-request-id": "WESTUS2:20210304T225852Z:a67f3d35-090a-43da-ba0d-ba3f6ad3cf9a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2842", + "name": "rg2842", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2842?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "30656b2e9bfbddb9acfa199d46f769ea", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c8e6e94b-ea35-4097-beb9-ef56d0965870", + "x-ms-ratelimit-remaining-subscription-writes": "1160", + "x-ms-request-id": "c8e6e94b-ea35-4097-beb9-ef56d0965870", + "x-ms-routing-request-id": "WESTUS2:20210304T225852Z:c8e6e94b-ea35-4097-beb9-ef56d0965870" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2842", + "name": "rg2842", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "87970728", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json new file mode 100644 index 0000000000000..daa1ac8aff9ac --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%NullKey%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "cde72c799d1bedb86602dbeae9f76fae", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d8d1ee79-0631-4177-a53d-e9a0977974a4", + "x-ms-ratelimit-remaining-subscription-reads": "11976", + "x-ms-request-id": "d8d1ee79-0631-4177-a53d-e9a0977974a4", + "x-ms-routing-request-id": "WESTUS2:20210304T225914Z:d8d1ee79-0631-4177-a53d-e9a0977974a4" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg881?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": "8f6c9a6f5112a5933f5ed131e16a5ca7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "218", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "34e7e70d-1b95-4639-8a87-9a1bec788f20", + "x-ms-ratelimit-remaining-subscription-writes": "1123", + "x-ms-request-id": "34e7e70d-1b95-4639-8a87-9a1bec788f20", + "x-ms-routing-request-id": "WESTUS2:20210304T225914Z:34e7e70d-1b95-4639-8a87-9a1bec788f20" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg881", + "name": "rg881", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg881?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "2ef4d881986a5c390bdea54df129ced6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "233", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "420fad60-ec76-4dff-8651-0d03638e824f", + "x-ms-ratelimit-remaining-subscription-writes": "1122", + "x-ms-request-id": "420fad60-ec76-4dff-8651-0d03638e824f", + "x-ms-routing-request-id": "WESTUS2:20210304T225915Z:420fad60-ec76-4dff-8651-0d03638e824f" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg881", + "name": "rg881", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg881?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "9a1b27b62a9bdb665427dc3ee7bc8597", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "249", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "acfea509-93df-4cb3-b068-cd94dac475d4", + "x-ms-ratelimit-remaining-subscription-writes": "1121", + "x-ms-request-id": "acfea509-93df-4cb3-b068-cd94dac475d4", + "x-ms-routing-request-id": "WESTUS2:20210304T225915Z:acfea509-93df-4cb3-b068-cd94dac475d4" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg881", + "name": "rg881", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg881?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "1e68437e7f7ad6e7610f8333ac45b415", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "249", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "007f49f1-4204-4284-9a27-dd6912fe6716", + "x-ms-ratelimit-remaining-subscription-writes": "1120", + "x-ms-request-id": "007f49f1-4204-4284-9a27-dd6912fe6716", + "x-ms-routing-request-id": "WESTUS2:20210304T225915Z:007f49f1-4204-4284-9a27-dd6912fe6716" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg881", + "name": "rg881", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "367325461", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json new file mode 100644 index 0000000000000..0f9d7ee632b31 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "980c56392d34f8170c395917d912eeeb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "999d5837-28b8-43fc-b16e-90de75e0e7d0", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "999d5837-28b8-43fc-b16e-90de75e0e7d0", + "x-ms-routing-request-id": "WESTUS2:20210304T225846Z:999d5837-28b8-43fc-b16e-90de75e0e7d0" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5264?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": "efd02ac9dc64bf012e2693de7b6950f7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9866d946-ee05-443d-8a7d-8f390e218797", + "x-ms-ratelimit-remaining-subscription-writes": "1171", + "x-ms-request-id": "9866d946-ee05-443d-8a7d-8f390e218797", + "x-ms-routing-request-id": "WESTUS2:20210304T225846Z:9866d946-ee05-443d-8a7d-8f390e218797" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5264", + "name": "rg5264", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5264?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "83e154f6e959a5862e009f566ff23ff3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ebca71b3-209e-4941-a1d7-197a7927e6bf", + "x-ms-ratelimit-remaining-subscription-writes": "1170", + "x-ms-request-id": "ebca71b3-209e-4941-a1d7-197a7927e6bf", + "x-ms-routing-request-id": "WESTUS2:20210304T225847Z:ebca71b3-209e-4941-a1d7-197a7927e6bf" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5264", + "name": "rg5264", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5264?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "a571a8dc66b879d40bd90507831a91d0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2f429603-edd3-400d-881a-1e3bfae24030", + "x-ms-ratelimit-remaining-subscription-writes": "1169", + "x-ms-request-id": "2f429603-edd3-400d-881a-1e3bfae24030", + "x-ms-routing-request-id": "WESTUS2:20210304T225847Z:2f429603-edd3-400d-881a-1e3bfae24030" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5264", + "name": "rg5264", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg5264?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "bee21f09680ddfb1a32ac0643caa503c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "288a69b0-4aa6-48aa-93f8-3b35fbf1a17b", + "x-ms-ratelimit-remaining-subscription-writes": "1168", + "x-ms-request-id": "288a69b0-4aa6-48aa-93f8-3b35fbf1a17b", + "x-ms-routing-request-id": "WESTUS2:20210304T225847Z:288a69b0-4aa6-48aa-93f8-3b35fbf1a17b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg5264", + "name": "rg5264", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "1230639007", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json new file mode 100644 index 0000000000000..62c3a0b0ae242 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key1%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "b63104118d8435bf401f03f069812721", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1f249017-b8b6-495e-95c6-942f1379b6e2", + "x-ms-ratelimit-remaining-subscription-reads": "11978", + "x-ms-request-id": "1f249017-b8b6-495e-95c6-942f1379b6e2", + "x-ms-routing-request-id": "WESTUS2:20210304T225909Z:1f249017-b8b6-495e-95c6-942f1379b6e2" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8660?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": "f3e74d87f83311cbd2ec4e92e7bec035", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:09 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ebbb95cd-18de-402a-94ba-d206e1845995", + "x-ms-ratelimit-remaining-subscription-writes": "1131", + "x-ms-request-id": "ebbb95cd-18de-402a-94ba-d206e1845995", + "x-ms-routing-request-id": "WESTUS2:20210304T225910Z:ebbb95cd-18de-402a-94ba-d206e1845995" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8660", + "name": "rg8660", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8660?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "be8623aed8eb86cd37b9ebaac8f9da3f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "81f15a68-342a-415a-a0c3-1ac3a244d517", + "x-ms-ratelimit-remaining-subscription-writes": "1130", + "x-ms-request-id": "81f15a68-342a-415a-a0c3-1ac3a244d517", + "x-ms-routing-request-id": "WESTUS2:20210304T225910Z:81f15a68-342a-415a-a0c3-1ac3a244d517" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8660", + "name": "rg8660", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8660?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "27ee3e4d4ddf0bdd66a4b2a171a35861", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ebadc9b8-3b60-4dc4-85d4-64c084ae273f", + "x-ms-ratelimit-remaining-subscription-writes": "1129", + "x-ms-request-id": "ebadc9b8-3b60-4dc4-85d4-64c084ae273f", + "x-ms-routing-request-id": "WESTUS2:20210304T225910Z:ebadc9b8-3b60-4dc4-85d4-64c084ae273f" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8660", + "name": "rg8660", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8660?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "5dbaba4363a1ae547f61bc790d2049d9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:10 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b8c6e32a-7ed9-4f6c-b279-e3603fd13cb0", + "x-ms-ratelimit-remaining-subscription-writes": "1128", + "x-ms-request-id": "b8c6e32a-7ed9-4f6c-b279-e3603fd13cb0", + "x-ms-routing-request-id": "WESTUS2:20210304T225910Z:b8c6e32a-7ed9-4f6c-b279-e3603fd13cb0" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8660", + "name": "rg8660", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "163468684", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json new file mode 100644 index 0000000000000..10dd08a37f256 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String]).json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "a7ee9d39096528f2c3ee4aa8e429747f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "55ec59ff-27ce-4cc5-a5bc-d38800742149", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "55ec59ff-27ce-4cc5-a5bc-d38800742149", + "x-ms-routing-request-id": "WESTUS2:20210304T225848Z:55ec59ff-27ce-4cc5-a5bc-d38800742149" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8422?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": "77198d81c27c504e969518aea57dc7b4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "55109b8c-a2e7-4c87-a0a6-e36552d4a3fd", + "x-ms-ratelimit-remaining-subscription-writes": "1167", + "x-ms-request-id": "55109b8c-a2e7-4c87-a0a6-e36552d4a3fd", + "x-ms-routing-request-id": "WESTUS2:20210304T225849Z:55109b8c-a2e7-4c87-a0a6-e36552d4a3fd" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8422", + "name": "rg8422", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8422?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "aa107969ee899ba2d227c4b7f338dbeb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3510af8f-708d-48e1-9533-40f0687653b7", + "x-ms-ratelimit-remaining-subscription-writes": "1166", + "x-ms-request-id": "3510af8f-708d-48e1-9533-40f0687653b7", + "x-ms-routing-request-id": "WESTUS2:20210304T225849Z:3510af8f-708d-48e1-9533-40f0687653b7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8422", + "name": "rg8422", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8422?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "be23300b5fbadabca057cf74d9791e71", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e5def8d0-f2fe-4fef-a930-1c23f7a26cb3", + "x-ms-ratelimit-remaining-subscription-writes": "1165", + "x-ms-request-id": "e5def8d0-f2fe-4fef-a930-1c23f7a26cb3", + "x-ms-routing-request-id": "WESTUS2:20210304T225849Z:e5def8d0-f2fe-4fef-a930-1c23f7a26cb3" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8422", + "name": "rg8422", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8422?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "af7af383d463937eea7da554fd965c5d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b215a9d4-6baf-410b-89f6-34c2f893a126", + "x-ms-ratelimit-remaining-subscription-writes": "1164", + "x-ms-request-id": "b215a9d4-6baf-410b-89f6-34c2f893a126", + "x-ms-routing-request-id": "WESTUS2:20210304T225850Z:b215a9d4-6baf-410b-89f6-34c2f893a126" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8422", + "name": "rg8422", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "296347168", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json new file mode 100644 index 0000000000000..a9de28debd1f0 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartRemoveTag(%key2%,System.Collections.Generic.Dictionary`2[System.String,System.String])Async.json @@ -0,0 +1,228 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "f45ee950dce0505d8019e58ca09fa48f", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cb644984-d3d9-42d1-b094-edfee444d228", + "x-ms-ratelimit-remaining-subscription-reads": "11977", + "x-ms-request-id": "cb644984-d3d9-42d1-b094-edfee444d228", + "x-ms-routing-request-id": "WESTUS2:20210304T225911Z:cb644984-d3d9-42d1-b094-edfee444d228" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg3944?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": "b0a07267a7100a936287d9f150678f75", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5cccfb95-e06d-470d-8fa8-628f11647fab", + "x-ms-ratelimit-remaining-subscription-writes": "1127", + "x-ms-request-id": "5cccfb95-e06d-470d-8fa8-628f11647fab", + "x-ms-routing-request-id": "WESTUS2:20210304T225912Z:5cccfb95-e06d-470d-8fa8-628f11647fab" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg3944", + "name": "rg3944", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg3944?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "666aabd6c0153e5cb0d444e38a4df26e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2e294863-3ce8-4a7b-a57d-072fb790471b", + "x-ms-ratelimit-remaining-subscription-writes": "1126", + "x-ms-request-id": "2e294863-3ce8-4a7b-a57d-072fb790471b", + "x-ms-routing-request-id": "WESTUS2:20210304T225912Z:2e294863-3ce8-4a7b-a57d-072fb790471b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg3944", + "name": "rg3944", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg3944?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "f4207cf95f54423fcbea7d55835f30b1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2abbc405-a39f-48e8-b85e-5efb875b2b0d", + "x-ms-ratelimit-remaining-subscription-writes": "1125", + "x-ms-request-id": "2abbc405-a39f-48e8-b85e-5efb875b2b0d", + "x-ms-routing-request-id": "WESTUS2:20210304T225912Z:2abbc405-a39f-48e8-b85e-5efb875b2b0d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg3944", + "name": "rg3944", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg3944?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "f3ca17562839a7971661ff3c63b07f15", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "099db791-e805-4608-89f9-c6eb70158ba0", + "x-ms-ratelimit-remaining-subscription-writes": "1124", + "x-ms-request-id": "099db791-e805-4608-89f9-c6eb70158ba0", + "x-ms-routing-request-id": "WESTUS2:20210304T225913Z:099db791-e805-4608-89f9-c6eb70158ba0" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg3944", + "name": "rg3944", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "1107254613", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartSetTags.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartSetTags.json new file mode 100644 index 0000000000000..5f91ec97af94d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartSetTags.json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "028ff19e6834c553adcf48afb032cc05", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:36 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c5b2e1b9-a8cd-41ea-a064-16a28b0b56eb", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "c5b2e1b9-a8cd-41ea-a064-16a28b0b56eb", + "x-ms-routing-request-id": "WESTUS2:20210304T225836Z:c5b2e1b9-a8cd-41ea-a064-16a28b0b56eb" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2945?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": "51c21b86ece8396d1f01fc99482002ac", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ec7f4261-ae9f-480c-af99-4195ec0fe718", + "x-ms-ratelimit-remaining-subscription-writes": "1187", + "x-ms-request-id": "ec7f4261-ae9f-480c-af99-4195ec0fe718", + "x-ms-routing-request-id": "WESTUS2:20210304T225837Z:ec7f4261-ae9f-480c-af99-4195ec0fe718" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2945", + "name": "rg2945", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2945?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "9f0ac8a4fbde6a57d02769206fa3e9ad", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "83ffd04a-42ff-4612-844a-117bad363a92", + "x-ms-ratelimit-remaining-subscription-writes": "1186", + "x-ms-request-id": "83ffd04a-42ff-4612-844a-117bad363a92", + "x-ms-routing-request-id": "WESTUS2:20210304T225837Z:83ffd04a-42ff-4612-844a-117bad363a92" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2945", + "name": "rg2945", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2945?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "6aa30fff743104b521c91466572b64ae", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bf4a4db3-5bf6-42cd-958a-099dd210de91", + "x-ms-ratelimit-remaining-subscription-writes": "1185", + "x-ms-request-id": "bf4a4db3-5bf6-42cd-958a-099dd210de91", + "x-ms-routing-request-id": "WESTUS2:20210304T225838Z:bf4a4db3-5bf6-42cd-958a-099dd210de91" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2945", + "name": "rg2945", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg2945?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "66", + "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": "690c034665c28b3bc45880c1824dca7c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "275", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:37 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e2aaead2-6027-4261-9956-21ddfe9fffee", + "x-ms-ratelimit-remaining-subscription-writes": "1184", + "x-ms-request-id": "e2aaead2-6027-4261-9956-21ddfe9fffee", + "x-ms-routing-request-id": "WESTUS2:20210304T225838Z:e2aaead2-6027-4261-9956-21ddfe9fffee" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg2945", + "name": "rg2945", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "717619711", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartSetTagsAsync.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartSetTagsAsync.json new file mode 100644 index 0000000000000..c9cee9e45b2a4 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/TaggableResourceTests/TestStartSetTagsAsync.json @@ -0,0 +1,230 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?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": "a7f4b134f6509b0c07126ff257bede52", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "397", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:58:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ead69b35-f668-49dc-a2da-0eeb97313863", + "x-ms-ratelimit-remaining-subscription-reads": "11982", + "x-ms-request-id": "ead69b35-f668-49dc-a2da-0eeb97313863", + "x-ms-routing-request-id": "WESTUS2:20210304T225900Z:ead69b35-f668-49dc-a2da-0eeb97313863" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": "Azure SDK sandbox", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8020?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": "ffc6d5eab6bcfb6f574117900f44a4ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "location": "West US 2", + "tags": {} + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "220", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fdd7d608-8a06-4297-9306-191baffea651", + "x-ms-ratelimit-remaining-subscription-writes": "1147", + "x-ms-request-id": "fdd7d608-8a06-4297-9306-191baffea651", + "x-ms-routing-request-id": "WESTUS2:20210304T225901Z:fdd7d608-8a06-4297-9306-191baffea651" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8020", + "name": "rg8020", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": {}, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8020?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "26", + "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": "28791bc5351ca362c91b6a00d5899afb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "235", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "17377af9-84aa-4786-b767-e905490b77db", + "x-ms-ratelimit-remaining-subscription-writes": "1146", + "x-ms-request-id": "17377af9-84aa-4786-b767-e905490b77db", + "x-ms-routing-request-id": "WESTUS2:20210304T225901Z:17377af9-84aa-4786-b767-e905490b77db" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8020", + "name": "rg8020", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8020?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "42", + "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": "0f06d885e08afb7785acf8b4f50bf8ce", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "251", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:00 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f573e786-25d1-4974-bbc2-b41ba1d909e2", + "x-ms-ratelimit-remaining-subscription-writes": "1145", + "x-ms-request-id": "f573e786-25d1-4974-bbc2-b41ba1d909e2", + "x-ms-routing-request-id": "WESTUS2:20210304T225901Z:f573e786-25d1-4974-bbc2-b41ba1d909e2" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8020", + "name": "rg8020", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/rg8020?api-version=2019-10-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "66", + "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": "a29147ca2965b517722335a14c6e26ce", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "275", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 04 Mar 2021 22:59:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5121a5bb-5089-49a7-8b0e-d28e4785ad2a", + "x-ms-ratelimit-remaining-subscription-writes": "1144", + "x-ms-request-id": "5121a5bb-5089-49a7-8b0e-d28e4785ad2a", + "x-ms-routing-request-id": "WESTUS2:20210304T225901Z:5121a5bb-5089-49a7-8b0e-d28e4785ad2a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/rg8020", + "name": "rg8020", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus2", + "tags": { + "UpdateKey1": "UpdateValue1", + "UpdateKey2": "UpdateValue2" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + } + ], + "Variables": { + "RandomSeed": "2104692397", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SubscriptionOperationsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SubscriptionOperationsTests.cs deleted file mode 100644 index 9489d4925482f..0000000000000 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SubscriptionOperationsTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using NUnit.Framework; -using System; - -namespace Azure.ResourceManager.Core.Tests -{ - public class SubscriptionOperationsTests - { - [TestCase(null)] - [TestCase("")] - [Ignore("Will remove after ADO 5122")] - public void TestGetResourceGroupOpsArgNullException(string resourceGroupName) - { - var client = new AzureResourceManagerClient(); - var subOps = client.DefaultSubscription; - Assert.Throws(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); - } - - [TestCase("te%st")] - [TestCase("test ")] - [TestCase("te$st")] - [TestCase("te#st")] - [TestCase("te#st")] - [Ignore("Will remove after ADO 5122")] - public void TestGetResourceGroupOpsArgException(string resourceGroupName) - { - var client = new AzureResourceManagerClient(); - var subOps = client.DefaultSubscription; - Assert.Throws(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); - } - - [TestCase("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] - [Ignore("Will remove after ADO 5122")] - public void TestGetResourceGroupOpsOutOfRangeArgException(string resourceGroupName) - { - var client = new AzureResourceManagerClient(); - var subOps = client.DefaultSubscription; - Assert.Throws(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); - } - - [TestCase("te.st")] - [TestCase("te")] - [TestCase("t")] - [TestCase("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] - [TestCase("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")] - [Ignore("Will remove after ADO 5122")] - public void TestGetResourceGroupOpsValid(string resourceGroupName) - { - var client = new AzureResourceManagerClient(); - var subOps = client.DefaultSubscription; - Assert.DoesNotThrow(delegate { subOps.GetResourceGroupOperations(resourceGroupName); }); - } - } -} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ApiVersionsBaseTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ApiVersionsBaseTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ApiVersionsBaseTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ApiVersionsBaseTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmClientOptionsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientOptionsTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmClientOptionsTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientOptionsTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmClientTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmClientTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmClientTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmResponseTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmResponseTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmResponseTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmResponseTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmVoidOperationTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmVoidOperationTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ArmVoidOperationTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ArmVoidOperationTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/IdentityTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/IdentityTests.cs similarity index 98% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/IdentityTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/IdentityTests.cs index c21977993ee47..f825a03ebb217 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/IdentityTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/IdentityTests.cs @@ -9,6 +9,8 @@ namespace Azure.ResourceManager.Core.Tests { public class IdentityTests { + private static readonly string TestAssetPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "Unit", "TestAssets", "Identity"); + [TestCase] public void CheckNoParamConstructor() { @@ -153,7 +155,7 @@ public void TestDeserializerInvalidDefaultJson() public JsonProperty DeserializerHelper(string filename) { - var json = File.ReadAllText(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestAssets", "Identity", filename)); + var json = File.ReadAllText(Path.Combine(TestAssetPath, filename)); JsonDocument document = JsonDocument.Parse(json); JsonElement rootElement = document.RootElement; return rootElement.EnumerateObject().First(); @@ -219,7 +221,7 @@ public void TestDeserializerValidMiddleExtraField() [TestCase] public void TestDeserializerValidOuterExtraField() { - var json = File.ReadAllText(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestAssets", "Identity", "SystemAndUserAssignedOuterExtraField.json")); + var json = File.ReadAllText(Path.Combine(TestAssetPath, "SystemAndUserAssignedOuterExtraField.json")); JsonDocument document = JsonDocument.Parse(json); JsonElement rootElement = document.RootElement; var identityJsonProperty = rootElement.EnumerateObject().ElementAt(1); diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/LocationTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/LocationTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/LocationTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/LocationTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/PlanTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/PlanTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/PlanTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/PlanTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Resource/TestResource.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/Resource/TestResource.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/Resource/TestResource.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/Resource/TestResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceGroupOperationsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceGroupOperationsTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceGroupOperationsTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceGroupOperationsTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceIdentifierTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceIdentifierTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceIdentifierTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceIdentifierTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceListOperationsTest.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceListOperationsTest.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceListOperationsTest.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceListOperationsTest.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceNameFilterTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceNameFilterTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceNameFilterTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceNameFilterTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTagFilterTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTagFilterTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTagFilterTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTagFilterTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTypeFilterTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTypeFilterTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTypeFilterTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTypeFilterTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTypeTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTypeTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/ResourceTypeTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/ResourceTypeTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/RpImplementations/ArmClientOptionsExtensions.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/RpImplementations/ArmClientOptionsExtensions.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/RpImplementations/ArmClientOptionsExtensions.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/RpImplementations/ArmClientOptionsExtensions.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/RpImplementations/FakeResourceApiVersions.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/RpImplementations/FakeResourceApiVersions.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/RpImplementations/FakeResourceApiVersions.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/RpImplementations/FakeResourceApiVersions.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/RpImplementations/FakeRpApiVersions.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/RpImplementations/FakeRpApiVersions.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/RpImplementations/FakeRpApiVersions.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/RpImplementations/FakeRpApiVersions.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SkuTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/SkuTests.cs similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/SkuTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/SkuTests.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SystemAssignedIdentityTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/SystemAssignedIdentityTests.cs similarity index 98% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/SystemAssignedIdentityTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/SystemAssignedIdentityTests.cs index 90b7a7c8b9dca..7f3945ed7274b 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SystemAssignedIdentityTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/SystemAssignedIdentityTests.cs @@ -9,6 +9,8 @@ namespace Azure.ResourceManager.Core.Tests { public class SystemAssignedIdentityTests { + private static readonly string TestAssetPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "Unit", "TestAssets", "SystemAssignedIdentity"); + [TestCase(0, null, null, null, null)] [TestCase(0, "72f988bf-86f1-41af-91ab-2d7cd011db47", "de29bab1-49e1-4705-819b-4dfddceaaa98", "72f988bf-86f1-41af-91ab-2d7cd011db47", "de29bab1-49e1-4705-819b-4dfddceaaa98")] @@ -148,7 +150,7 @@ public JsonProperty DeserializerHelper(string filename) private static string GetFileText(string filename) { - return File.ReadAllText(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestAssets", "SystemAssignedIdentity", filename)); + return File.ReadAllText(Path.Combine(TestAssetPath, filename)); } [TestCase] diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/InvalidType.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/InvalidType.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/InvalidType.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/InvalidType.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/InvalidTypeIsNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/InvalidTypeIsNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/InvalidTypeIsNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/InvalidTypeIsNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedInnerExtraField.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedInnerExtraField.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedInnerExtraField.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedInnerExtraField.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedMiddleExtraField.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedMiddleExtraField.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedMiddleExtraField.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedMiddleExtraField.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedOuterExtraField.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedOuterExtraField.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedOuterExtraField.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedOuterExtraField.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedValid.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedValid.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedValid.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedValid.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedValidMultIdentities.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedValidMultIdentities.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAndUserAssignedValidMultIdentities.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAndUserAssignedValidMultIdentities.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAssigned.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAssigned.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/SystemAssigned.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/SystemAssigned.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/UserAssigned.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/UserAssigned.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/Identity/UserAssigned.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/Identity/UserAssigned.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedBothEmptyString.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedBothEmptyString.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedBothEmptyString.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedBothEmptyString.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedBothValuesNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedBothValuesNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedBothValuesNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedBothValuesNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedInvalid.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedInvalid.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedInvalid.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedInvalid.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedOneEmptyString.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedOneEmptyString.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedOneEmptyString.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedOneEmptyString.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedOneOtherValueNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedOneOtherValueNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedOneOtherValueNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedOneOtherValueNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedOneValueNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedOneValueNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedOneValueNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedOneValueNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedValid.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedValid.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedValid.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedValid.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedValidExtraField.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedValidExtraField.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/SystemAssignedIdentity/SystemAssignedValidExtraField.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/SystemAssignedIdentity/SystemAssignedValidExtraField.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedBothEmptyString.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedBothEmptyString.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedBothEmptyString.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedBothEmptyString.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedBothValuesNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedBothValuesNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedBothValuesNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedBothValuesNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedExtraField.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedExtraField.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedExtraField.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedExtraField.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedInvalid.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedInvalid.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedInvalid.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedInvalid.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedInvalidMultipleIdentities.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedInvalidMultipleIdentities.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedInvalidMultipleIdentities.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedInvalidMultipleIdentities.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedOneEmptyString.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedOneEmptyString.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedOneEmptyString.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedOneEmptyString.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedOneOtherValueNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedOneOtherValueNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedOneOtherValueNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedOneOtherValueNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedOneValueNull.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedOneValueNull.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedOneValueNull.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedOneValueNull.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedValid.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedValid.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedValid.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedValid.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedValidMultipleIdentities.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedValidMultipleIdentities.json similarity index 100% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/TestAssets/UserAssignedIdentity/UserAssignedValidMultipleIdentities.json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/TestAssets/UserAssignedIdentity/UserAssignedValidMultipleIdentities.json diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/UserAssignedIdentityTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/UserAssignedIdentityTests.cs similarity index 98% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/UserAssignedIdentityTests.cs rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/UserAssignedIdentityTests.cs index c1ac70ce053d1..6f67757266317 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/UserAssignedIdentityTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Unit/UserAssignedIdentityTests.cs @@ -8,6 +8,8 @@ namespace Azure.ResourceManager.Core.Tests { public class UserAssignedIdentityTests { + private static readonly string TestAssetPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "Unit", "TestAssets", "UserAssignedIdentity"); + [TestCase(0, "72f988bf-86f1-41af-91ab-2d7cd011db47", "de29bab1-49e1-4705-819b-4dfddceaaa98", "72f988bf-86f1-41af-91ab-2d7cd011db47", "de29bab1-49e1-4705-819b-4dfddceaaa98")] [TestCase(1, "72f988bf-86f1-41af-91ab-2d7cd011db48", "de29bab1-49e1-4705-819b-4dfddceaaa98", "72f988bf-86f1-41af-91ab-2d7cd011db47", "de29bab1-49e1-4705-819b-4dfddceaaa98")] @@ -83,7 +85,7 @@ public JsonElement DeserializerHelper(string filename) private static string GetFileText(string filename) { - return File.ReadAllText(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestAssets", "UserAssignedIdentity", filename)); + return File.ReadAllText(Path.Combine(TestAssetPath, filename)); } [TestCase]