diff --git a/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs b/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs index a359651411024..5cc3464a587ea 100644 --- a/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs +++ b/common/ManagementTestShared/Redesign/ManagementRecordedTestBase.cs @@ -4,6 +4,7 @@ using Azure.Core; using Azure.Core.TestFramework; using Azure.ResourceManager.Core; +using Castle.DynamicProxy; using NUnit.Framework; using System; using System.Collections.Generic; @@ -51,6 +52,8 @@ private ArmClient GetCleanupClient() return null; } + protected TClient InstrumentClientExtension(TClient client) => (TClient)InstrumentClient(typeof(TClient), client, new IInterceptor[] { new ManagementInterceptor(this) }); + protected ArmClient GetArmClient(ArmClientOptions clientOptions = default) { var options = InstrumentClientOptions(clientOptions ?? new ArmClientOptions()); diff --git a/sdk/core/Azure.Core.TestFramework/src/ManagementInterceptor.cs b/sdk/core/Azure.Core.TestFramework/src/ManagementInterceptor.cs index 7a1a1312dfa1b..c116dac363122 100644 --- a/sdk/core/Azure.Core.TestFramework/src/ManagementInterceptor.cs +++ b/sdk/core/Azure.Core.TestFramework/src/ManagementInterceptor.cs @@ -8,7 +8,7 @@ namespace Azure.Core.TestFramework { - internal class ManagementInterceptor : IInterceptor + public class ManagementInterceptor : IInterceptor { private readonly ClientTestBase _testBase; private static readonly ProxyGenerator s_proxyGenerator = new ProxyGenerator(); @@ -31,6 +31,9 @@ public void Intercept(IInvocation invocation) var type = result.GetType(); if (type.Name.StartsWith("Task")) { + if (((Task)result).IsFaulted || ((Task)result).Status == TaskStatus.WaitingForActivation) + return; + var taskResultType = type.GetGenericArguments()[0]; if (taskResultType.Name.StartsWith("ArmResponse") || taskResultType.Name.StartsWith("ArmOperation")) { @@ -44,6 +47,9 @@ public void Intercept(IInvocation invocation) } else if (type.Name.StartsWith("ValueTask")) { + if ((bool)type.GetProperty("IsFaulted").GetValue(result)) + return; + var taskResultType = type.GetGenericArguments()[0]; if (taskResultType.Name.StartsWith("Response") || taskResultType.Name.StartsWith("ArmResponse")) { diff --git a/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs b/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs index 13ee468876ae9..88f97117dda86 100644 --- a/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs +++ b/sdk/core/Azure.Core/tests/ManagementRecordedTestBaseTests.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Threading.Tasks; using Azure.Core.TestFramework; using Azure.ResourceManager.Core; @@ -134,5 +135,52 @@ public async Task ValidateWaitForCompletion() Assert.AreEqual("TestResourceProxy", testResource.GetType().Name); Assert.AreEqual("success", testResource.Method()); } + + [Test] + public async Task ValidateExceptionResponse() + { + ManagementTestClient client = InstrumentClient(new ManagementTestClient()); + TestResourceOperations rgOp = client.GetTestResourceOperations(); + try + { + var testResourceOp = await rgOp.GetArmResponseExceptionAsync(); + Assert.Fail("Argument exception wasn't thrown"); + } + catch (ArgumentException) + { + } + } + + [Test] + public async Task ValidateExceptionOperation() + { + ManagementTestClient client = InstrumentClient(new ManagementTestClient()); + TestResourceOperations rgOp = client.GetTestResourceOperations(); + try + { + var testResourceOp = await rgOp.GetArmOperationExceptionAsync(); + var testResource = await testResourceOp.WaitForCompletionAsync(); + Assert.Fail("Argument exception wasn't thrown"); + } + catch (ArgumentException) + { + } + } + + [Test] + public async Task ValidateExceptionOperationWaitForCompletion() + { + ManagementTestClient client = InstrumentClient(new ManagementTestClient()); + TestResourceOperations rgOp = client.GetTestResourceOperations(); + var testResourceOp = await rgOp.GetArmOperationAsync(true); + try + { + var testResource = await testResourceOp.WaitForCompletionAsync(); + Assert.Fail("Argument exception wasn't thrown"); + } + catch (ArgumentException) + { + } + } } } diff --git a/sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs b/sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs index 95ef4c777407d..3cbc9db31f415 100644 --- a/sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs +++ b/sdk/core/Azure.Core/tests/TestClients/ArmOperationTest.cs @@ -12,13 +12,16 @@ public class ArmOperationTest : ArmOperation where T : class { private T _value; + private bool _exceptionOnWait; + protected ArmOperationTest() { } - public ArmOperationTest(T value) + public ArmOperationTest(T value, bool exceptionOnWait = false) { _value = value; + _exceptionOnWait = exceptionOnWait; } public override string Id => "testId"; @@ -36,21 +39,33 @@ public override Response GetRawResponse() public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) { + if (_exceptionOnWait) + throw new ArgumentException("FakeArg"); + return new ValueTask>(Response.FromValue(_value, null)); } public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken) { + if (_exceptionOnWait) + throw new ArgumentException("FakeArg"); + return new ValueTask>(Response.FromValue(_value, null)); } public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) { + if (_exceptionOnWait) + throw new ArgumentException("FakeArg"); + return new ValueTask(Response.FromValue(_value, null) as Response); } public override Response UpdateStatus(CancellationToken cancellationToken = default) { + if (_exceptionOnWait) + throw new ArgumentException("FakeArg"); + return Response.FromValue(_value, null) as Response; } } diff --git a/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs b/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs index e10f29d353f68..46b5116c18440 100644 --- a/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs +++ b/sdk/core/Azure.Core/tests/TestClients/TestResourceOperations.cs @@ -17,14 +17,14 @@ public virtual TestResourceOperations GetAnotherOperations() return new TestResource(); } - public virtual ArmOperationTest GetArmOperation(CancellationToken cancellationToken = default) + public virtual ArmOperationTest GetArmOperation(bool exceptionOnWait = false, CancellationToken cancellationToken = default) { using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperation"); scope.Start(); try { - return new ArmOperationTest(new TestResource()); + return new ArmOperationTest(new TestResource(), exceptionOnWait); } catch (Exception e) { @@ -33,14 +33,14 @@ public virtual ArmOperationTest GetArmOperation(CancellationToken } } - public virtual Task> GetArmOperationAsync(CancellationToken cancellationToken = default) + public virtual Task> GetArmOperationAsync(bool exceptionOnWait = false, CancellationToken cancellationToken = default) { using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperation"); scope.Start(); try { - return Task.FromResult(new ArmOperationTest(new TestResource())); + return Task.FromResult(new ArmOperationTest(new TestResource(), exceptionOnWait)); } catch (Exception e) { @@ -145,6 +145,70 @@ public virtual Task> GetPhArmResponseAsync(Cancell } } + public virtual ArmResponseTest GetArmResponseException(CancellationToken cancellationToken = default) + { + using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmResponseException"); + scope.Start(); + + try + { + throw new ArgumentException("FakeArg"); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + public virtual Task> GetArmResponseExceptionAsync(CancellationToken cancellationToken = default) + { + using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmResponseException"); + scope.Start(); + + try + { + throw new ArgumentException("FakeArg"); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + public virtual ArmOperationTest GetArmOperationException(CancellationToken cancellationToken = default) + { + using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperationException"); + scope.Start(); + + try + { + throw new ArgumentException("FakeArg"); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + public virtual Task> GetArmOperationExceptionAsync(CancellationToken cancellationToken = default) + { + using var scope = _diagnostic.CreateScope("TestResourceOperations.GetArmOperationException"); + scope.Start(); + + try + { + throw new ArgumentException("FakeArg"); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + public virtual string Method() { return "success"; diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs index 93e75815bc2c2..d63ad263e5316 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ArmClient.cs @@ -106,17 +106,17 @@ private ArmClient( /// /// Gets the Azure Resource Manager client options. /// - private ArmClientOptions ClientOptions; + protected virtual ArmClientOptions ClientOptions { get; private set; } /// /// Gets the Azure credential. /// - private TokenCredential Credential; + protected virtual TokenCredential Credential { get; private set; } /// /// Gets the base URI of the service. /// - private Uri BaseUri; + protected virtual Uri BaseUri { get; private set; } /// /// Gets the Azure subscriptions. diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceGroupContainer.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceGroupContainer.cs index 5a88837c374bb..63d9a58eed7f3 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceGroupContainer.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceGroupContainer.cs @@ -219,9 +219,6 @@ public virtual AsyncPageable ListAsync(CancellationToken cancella /// public override ArmResponse Get(string resourceGroupName, CancellationToken cancellationToken = default) { - if (string.IsNullOrWhiteSpace(resourceGroupName)) - throw new ArgumentException("resourceGroupName cannot be null or a whitespace.", nameof(resourceGroupName)); - using var scope = Diagnostics.CreateScope("ResourceGroupContainer.Get"); scope.Start(); @@ -242,16 +239,14 @@ public override ArmResponse Get(string resourceGroupName, Cancell /// public override async Task> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) { - if (string.IsNullOrWhiteSpace(resourceGroupName)) - throw new ArgumentException("resourceGroupName cannot be null or a whitespace.", nameof(resourceGroupName)); - using var scope = Diagnostics.CreateScope("ResourceGroupContainer.Get"); scope.Start(); try { + var result = await Operations.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false); return new PhArmResponse( - await Operations.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false), + result, g => { return new ResourceGroup(Parent, new ResourceGroupData(g)); diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceOperationsBase.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceOperationsBase.cs index a2f9510de09d3..512c5de7acb6f 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceOperationsBase.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ResourceOperationsBase.cs @@ -67,7 +67,7 @@ protected ResourceOperationsBase(OperationsBase parentOperations, ResourceIdenti /// /// /// - internal ResourceOperationsBase(ClientContext clientContext, string id) + internal ResourceOperationsBase(ClientContext clientContext, ResourceIdentifier id) : base(clientContext, id) { } 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 8a49f03995154..2cbe0550cee74 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 @@ -30,6 +30,7 @@ + diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupOperationsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupOperationsTests.cs index e65f82b4b4375..ca33ce1e13200 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupOperationsTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupOperationsTests.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Threading; using System.Threading.Tasks; using Azure.Core.TestFramework; using NUnit.Framework; @@ -10,7 +12,7 @@ namespace Azure.ResourceManager.Core.Tests public class ResourceGroupOperationsTests : ResourceManagerTestBase { public ResourceGroupOperationsTests(bool isAsync) - : base(isAsync) //, RecordedTestMode.Record) + : base(isAsync)//, RecordedTestMode.Record) { } @@ -32,6 +34,22 @@ public async Task StartDeleteRg() await deleteOp.WaitForCompletionAsync(); } + [TestCase] + [RecordedTest] + public async Task StartDeleteNonExistantRg() + { + var rgOp = InstrumentClientExtension(Client.GetResourceGroupOperations($"/subscriptions/{TestEnvironment.SubscriptionId}/resourceGroups/fake")); + var deleteOp = rgOp.StartDeleteAsync(); + try + { + var response = await (await deleteOp).WaitForCompletionAsync(); + Assert.Fail("RequestFailedException was not thrown"); + } + catch (RequestFailedException e) when (e.Status == 404) + { + } + } + [TestCase] [RecordedTest] public async Task Get() diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs index 0784b4f6d20f5..00aa02b949f83 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/SubscriptionOperationsTests.cs @@ -11,6 +11,7 @@ namespace Azure.ResourceManager.Core.Tests { + [Parallelizable] public class SubscriptionOperationsTests : ResourceManagerTestBase { public SubscriptionOperationsTests(bool isAsync) @@ -20,7 +21,6 @@ public SubscriptionOperationsTests(bool isAsync) [TestCase] [RecordedTest] - [Ignore("Will fix after user study")] public async Task GetSubscriptionOperation() { var sub = await Client.GetSubscriptions().TryGetAsync(TestEnvironment.SubscriptionId); @@ -28,9 +28,7 @@ public async Task GetSubscriptionOperation() } [TestCase(null)] - [TestCase("")] [RecordedTest] - [Ignore("Will fix after user study")] public async Task TestGetResourceGroupOpsArgNullException(string resourceGroupName) { var subOps = Client.DefaultSubscription; @@ -39,7 +37,7 @@ public async Task TestGetResourceGroupOpsArgNullException(string resourceGroupNa _ = await subOps.GetResourceGroups().GetAsync(resourceGroupName); Assert.Fail("Expected exception was not thrown"); } - catch (ArgumentException) + catch (ArgumentNullException) { } } @@ -48,7 +46,6 @@ public async Task TestGetResourceGroupOpsArgNullException(string resourceGroupNa [TestCase("te$st")] [TestCase("te#st")] [RecordedTest] - [Ignore("Will fix after user study")] public async Task TestGetResourceGroupOpsArgException(string resourceGroupName) { var subOps = Client.DefaultSubscription; @@ -60,15 +57,25 @@ public async Task TestGetResourceGroupOpsArgException(string resourceGroupName) catch (RequestFailedException e) when (e.Status == 400) { } - catch(Exception e) + } + + [TestCase("")] + [RecordedTest] + public async Task TestGetResourceGroupOpsEmptyString(string resourceGroupName) + { + var subOps = Client.DefaultSubscription; + try + { + ResourceGroup rg = await subOps.GetResourceGroups().GetAsync(resourceGroupName); + Assert.Fail("Expected exception was not thrown"); + } + catch (ArgumentException) { - string x = e.Message; } } [TestCase(91)] [RecordedTest] - [Ignore("Will fix after user study")] public async Task TestGetResourceGroupOpsOutOfRangeArgException(int length) { var resourceGroupName = GetLongString(length); @@ -88,7 +95,6 @@ public async Task TestGetResourceGroupOpsOutOfRangeArgException(int length) [TestCase("te")] [TestCase("t")] [RecordedTest] - [Ignore("Will fix after user study")] public async Task TestGetResourceGroupOpsValid(string resourceGroupName) { var subOps = Client.DefaultSubscription; @@ -104,7 +110,6 @@ public async Task TestGetResourceGroupOpsValid(string resourceGroupName) [TestCase(89)] [TestCase(90)] [RecordedTest] - [Ignore("Will fix after user study")] public async Task TestGetResourceGroupOpsLong(int length) { var resourceGroupName = GetLongString(length); diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupOperationsTests/StartDeleteNonExistantRg().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupOperationsTests/StartDeleteNonExistantRg().json new file mode 100644 index 0000000000000..18e3e8e494c6f --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupOperationsTests/StartDeleteNonExistantRg().json @@ -0,0 +1,84 @@ +{ + "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": "f0f7c418531f7e23129990a1ce22438d", + "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": "Tue, 13 Apr 2021 03:20:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7c6b7813-defa-4f41-9d9b-a6a5fccb0b8c", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "7c6b7813-defa-4f41-9d9b-a6a5fccb0b8c", + "x-ms-routing-request-id": "WESTUS2:20210413T032059Z:7c6b7813-defa-4f41-9d9b-a6a5fccb0b8c" + }, + "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/fake?api-version=2019-10-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-725366f2c1131a4d9932ead3fc84d357-0907cb6abc183d43-00", + "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": "7b606c2e942c259d07bfe5e290c76be0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "96", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 03:20:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1dc03e60-bac2-4ca6-82a0-d341f3157180", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-deletes": "14999", + "x-ms-request-id": "1dc03e60-bac2-4ca6-82a0-d341f3157180", + "x-ms-routing-request-id": "WESTUS2:20210413T032059Z:1dc03e60-bac2-4ca6-82a0-d341f3157180" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027fake\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "667343098", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupOperationsTests/StartDeleteNonExistantRg()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupOperationsTests/StartDeleteNonExistantRg()Async.json new file mode 100644 index 0000000000000..f906271158df6 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupOperationsTests/StartDeleteNonExistantRg()Async.json @@ -0,0 +1,84 @@ +{ + "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": "a59e3ba18f02fb41c9f7e14a75be1692", + "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": "Tue, 13 Apr 2021 03:20:58 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b51dab9c-7941-44e2-b54e-d2ed76875651", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "b51dab9c-7941-44e2-b54e-d2ed76875651", + "x-ms-routing-request-id": "WESTUS2:20210413T032059Z:b51dab9c-7941-44e2-b54e-d2ed76875651" + }, + "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/fake?api-version=2019-10-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-35b58b3e5da5af4ea3cc241ebdfe5d1c-7331142426c65843-00", + "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": "59da4c8c96951def4aed1446f27b5729", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "96", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 03:20:59 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c4a572ac-7171-4dc6-8487-5aa94349ef8d", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-deletes": "14999", + "x-ms-request-id": "c4a572ac-7171-4dc6-8487-5aa94349ef8d", + "x-ms-routing-request-id": "WESTUS2:20210413T032059Z:c4a572ac-7171-4dc6-8487-5aa94349ef8d" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027fake\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1042677596", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation().json index 0acbfdde32450..959db2e99ea6c 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation().json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation().json @@ -7,7 +7,7 @@ "Accept": "application/json", "Authorization": "Sanitized", "User-Agent": "azsdk-net-ResourceManager.Resources/1.0.0-preview.2 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19042 )", - "x-ms-client-request-id": "795fad1a30d20a1bfed6e99e6fb43cc2", + "x-ms-client-request-id": "8198a4bf5136dcf4ab25f03c0309b950", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -16,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Apr 2021 19:49:58 GMT", + "Date": "Tue, 13 Apr 2021 02:29:46 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1abbee97-7b90-4f44-ad41-c037e6139bdf", - "x-ms-ratelimit-remaining-subscription-reads": "11998", - "x-ms-request-id": "1abbee97-7b90-4f44-ad41-c037e6139bdf", - "x-ms-routing-request-id": "WESTUS2:20210405T194958Z:1abbee97-7b90-4f44-ad41-c037e6139bdf" + "x-ms-correlation-request-id": "78f26ed1-40ce-4fb9-83dc-21a4eecf92f7", + "x-ms-ratelimit-remaining-subscription-reads": "11972", + "x-ms-request-id": "78f26ed1-40ce-4fb9-83dc-21a4eecf92f7", + "x-ms-routing-request-id": "WESTUS2:20210413T022946Z:78f26ed1-40ce-4fb9-83dc-21a4eecf92f7" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -47,9 +47,9 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-8c02e1693c9510499c0d136aa71c1cbd-38895b51f96f9449-00", + "traceparent": "00-4892164e1cc8f849b66860b4fcac4e12-d8be8f9541084048-00", "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": "5c7f89d333ae3d92d5841fb3910b12a1", + "x-ms-client-request-id": "428ca8fce5e2d24cdc5f2e1f931ee941", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -58,15 +58,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Mon, 05 Apr 2021 19:49:58 GMT", + "Date": "Tue, 13 Apr 2021 02:29:46 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "63a1dc68-8c30-4246-8b68-fa1b1f4a2975", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "63a1dc68-8c30-4246-8b68-fa1b1f4a2975", - "x-ms-routing-request-id": "WESTUS2:20210405T194958Z:63a1dc68-8c30-4246-8b68-fa1b1f4a2975" + "x-ms-correlation-request-id": "7223a4fd-6f66-44e7-baf8-99fd33f0d706", + "x-ms-ratelimit-remaining-subscription-reads": "11971", + "x-ms-request-id": "7223a4fd-6f66-44e7-baf8-99fd33f0d706", + "x-ms-routing-request-id": "WESTUS2:20210413T022947Z:7223a4fd-6f66-44e7-baf8-99fd33f0d706" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -85,7 +85,7 @@ } ], "Variables": { - "RandomSeed": "1589746029", + "RandomSeed": "2001402527", "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" } } \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation()Async.json new file mode 100644 index 0000000000000..6a2505846a533 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/GetSubscriptionOperation()Async.json @@ -0,0 +1,91 @@ +{ + "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": "8198a4bf5136dcf4ab25f03c0309b950", + "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": "Tue, 13 Apr 2021 02:29:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "77dbe379-9ec3-4a45-ac02-3479a67b01de", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "77dbe379-9ec3-4a45-ac02-3479a67b01de", + "x-ms-routing-request-id": "WESTUS2:20210413T022946Z:77dbe379-9ec3-4a45-ac02-3479a67b01de" + }, + "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?api-version=2019-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-832b80ddd1d6234fb8b34b243f0d56ef-8c172586ee8a2444-00", + "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": "428ca8fce5e2d24cdc5f2e1f931ee941", + "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": "Tue, 13 Apr 2021 02:29:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "66d8f65b-2c19-4e3b-b5f4-965141612977", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "66d8f65b-2c19-4e3b-b5f4-965141612977", + "x-ms-routing-request-id": "WESTUS2:20210413T022947Z:66d8f65b-2c19-4e3b-b5f4-965141612977" + }, + "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": "2001402527", + "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 index 6a821422e011b..c10e2bf3f3132 100644 --- 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 @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "ea56958505acc238fe794a2d27a85686", + "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": "f210d41c6b9fb77f81698429246bf2a2", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:17 GMT", + "Date": "Tue, 13 Apr 2021 02:29:48 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "74c3da20-0ba5-4d84-ab64-b0937c150190", - "x-ms-ratelimit-remaining-subscription-reads": "11993", - "x-ms-request-id": "74c3da20-0ba5-4d84-ab64-b0937c150190", - "x-ms-routing-request-id": "WESTUS:20210330T074217Z:74c3da20-0ba5-4d84-ab64-b0937c150190" + "x-ms-correlation-request-id": "d53ee171-2fa9-4037-a974-11634dfd7124", + "x-ms-ratelimit-remaining-subscription-reads": "11962", + "x-ms-request-id": "d53ee171-2fa9-4037-a974-11634dfd7124", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:d53ee171-2fa9-4037-a974-11634dfd7124" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te%23st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-c52985900448b94289d89be646274f53-1f1e0be426d79246-00", + "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": "08413fd3275bcfb81906c685cd6ff9fa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "194", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "031d0f98-33c1-4555-8a8d-9ea4766145ad", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11961", + "x-ms-request-id": "031d0f98-33c1-4555-8a8d-9ea4766145ad", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:031d0f98-33c1-4555-8a8d-9ea4766145ad" + }, + "ResponseBody": { + "error": { + "code": "InvalidResourceGroup", + "message": "The provided resource group name \u0027te#st\u0027 has these invalid characters: \u0027#\u0027. The name can only be a letter, digit, \u0027-\u0027, \u0027.\u0027, \u0027(\u0027, \u0027)\u0027 or \u0027_\u0027." + } + } } ], "Variables": { - "RandomSeed": "1979975508", + "RandomSeed": "1156167633", "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%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te#st%)Async.json new file mode 100644 index 0000000000000..5062c2e1fcb13 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te#st%)Async.json @@ -0,0 +1,84 @@ +{ + "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": "d7c05cebf76d7ff45ce56be04541bee3", + "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": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9c9de3a3-4c84-4fe7-8d4d-c9e22967aa51", + "x-ms-ratelimit-remaining-subscription-reads": "11964", + "x-ms-request-id": "9c9de3a3-4c84-4fe7-8d4d-c9e22967aa51", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:9c9de3a3-4c84-4fe7-8d4d-c9e22967aa51" + }, + "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/te%23st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d0c3b3590bfc2d4f83b863c75b3bcb10-3b9ee3667db94f4b-00", + "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": "593bc9b9a6e28223f27430ed763b0a42", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "194", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1ceddb36-ecfe-40db-8bde-51d5dea229b5", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11963", + "x-ms-request-id": "1ceddb36-ecfe-40db-8bde-51d5dea229b5", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:1ceddb36-ecfe-40db-8bde-51d5dea229b5" + }, + "ResponseBody": { + "error": { + "code": "InvalidResourceGroup", + "message": "The provided resource group name \u0027te#st\u0027 has these invalid characters: \u0027#\u0027. The name can only be a letter, digit, \u0027-\u0027, \u0027.\u0027, \u0027(\u0027, \u0027)\u0027 or \u0027_\u0027." + } + } + } + ], + "Variables": { + "RandomSeed": "1674926328", + "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 index 436ab55bef041..bd66849ad2bfd 100644 --- 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 @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "199b33c579d6aefa87c93c3861af4d61", + "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": "ee03a15118396421ddb17f95e70f1055", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:17 GMT", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7e411c15-8185-4a6e-abbe-55742062dbe3", - "x-ms-ratelimit-remaining-subscription-reads": "11995", - "x-ms-request-id": "7e411c15-8185-4a6e-abbe-55742062dbe3", - "x-ms-routing-request-id": "WESTUS:20210330T074217Z:7e411c15-8185-4a6e-abbe-55742062dbe3" + "x-ms-correlation-request-id": "6c760270-691e-4437-9b9b-455475e8a4f8", + "x-ms-ratelimit-remaining-subscription-reads": "11966", + "x-ms-request-id": "6c760270-691e-4437-9b9b-455475e8a4f8", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:6c760270-691e-4437-9b9b-455475e8a4f8" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te%24st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-7bc7b9920eecea498dc55749c26f2709-473c1e0f4781db40-00", + "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": "1f05fb747f20eeff525522c2cc403bd2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "194", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3f949f0c-2aaa-41c8-accc-2cca52478419", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11965", + "x-ms-request-id": "3f949f0c-2aaa-41c8-accc-2cca52478419", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:3f949f0c-2aaa-41c8-accc-2cca52478419" + }, + "ResponseBody": { + "error": { + "code": "InvalidResourceGroup", + "message": "The provided resource group name \u0027te$st\u0027 has these invalid characters: \u0027$\u0027. The name can only be a letter, digit, \u0027-\u0027, \u0027.\u0027, \u0027(\u0027, \u0027)\u0027 or \u0027_\u0027." + } + } } ], "Variables": { - "RandomSeed": "1710569629", + "RandomSeed": "1118646037", "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%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te$st%)Async.json new file mode 100644 index 0000000000000..0cb1afda90a7a --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te$st%)Async.json @@ -0,0 +1,84 @@ +{ + "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": "29e9a8bbd19076b6c55e5ab7a072dcb6", + "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": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "02df1711-602f-4870-a493-7117edd3de79", + "x-ms-ratelimit-remaining-subscription-reads": "11968", + "x-ms-request-id": "02df1711-602f-4870-a493-7117edd3de79", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:02df1711-602f-4870-a493-7117edd3de79" + }, + "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/te%24st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e6c23d3fe3c00346ab8467a589b67fc6-a38b9644ca640247-00", + "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": "29d01218d031e414a84f27fc103455b6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "194", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "258cd393-3699-42a3-b197-606cf33fb224", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11967", + "x-ms-request-id": "258cd393-3699-42a3-b197-606cf33fb224", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:258cd393-3699-42a3-b197-606cf33fb224" + }, + "ResponseBody": { + "error": { + "code": "InvalidResourceGroup", + "message": "The provided resource group name \u0027te$st\u0027 has these invalid characters: \u0027$\u0027. The name can only be a letter, digit, \u0027-\u0027, \u0027.\u0027, \u0027(\u0027, \u0027)\u0027 or \u0027_\u0027." + } + } + } + ], + "Variables": { + "RandomSeed": "560117442", + "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 index 59029645bbba2..74e494f9628f7 100644 --- 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 @@ -6,12 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-2c697c825bcf27458de24e6a221984e8-e607fec94528574e-00", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "57c74b10d17b50f15940ea0884f306c4", + "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": "fd6bc5cd76d09742297e79672748c285", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -20,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:16 GMT", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d737b722-2b31-4874-b039-84c79758f69c", - "x-ms-ratelimit-remaining-subscription-reads": "11997", - "x-ms-request-id": "d737b722-2b31-4874-b039-84c79758f69c", - "x-ms-routing-request-id": "WESTUS:20210330T074216Z:d737b722-2b31-4874-b039-84c79758f69c" + "x-ms-correlation-request-id": "458b3107-73f0-43f3-8b27-1861d4ede245", + "x-ms-ratelimit-remaining-subscription-reads": "11970", + "x-ms-request-id": "458b3107-73f0-43f3-8b27-1861d4ede245", + "x-ms-routing-request-id": "WESTUS2:20210413T022947Z:458b3107-73f0-43f3-8b27-1861d4ede245" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -44,10 +40,44 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te%25st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-a4f8675b5e6de5449fee19092855f054-25fa02f17fe1d04d-00", + "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": "3431476d88737659327d4b8351f3d837", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "277", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0a5dbf8a-4737-4925-92cc-1e744893d72d", + "x-ms-failure-cause": "gateway", + "x-ms-request-id": "0a5dbf8a-4737-4925-92cc-1e744893d72d", + "x-ms-routing-request-id": "WESTUS2:20210413T022947Z:0a5dbf8a-4737-4925-92cc-1e744893d72d" + }, + "ResponseBody": { + "error": { + "code": "InvalidDoubleEncodedRequestUri", + "message": "The request URI \u0027https://management.azure.com:443/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te%25st?api-version=2019-10-01\u0027 is not valid, because it contains double encoding sequence \u0027%25\u0027." + } + } } ], "Variables": { - "RandomSeed": "2045356497", + "RandomSeed": "1732164761", "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%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te%st%)Async.json new file mode 100644 index 0000000000000..7cfcd200c2155 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%te%st%)Async.json @@ -0,0 +1,83 @@ +{ + "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": "9e4e254988129916e75b69193e262222", + "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": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fbc33e7d-bbfc-4938-ac61-6cf89143a3c2", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "fbc33e7d-bbfc-4938-ac61-6cf89143a3c2", + "x-ms-routing-request-id": "WESTUS2:20210413T022947Z:fbc33e7d-bbfc-4938-ac61-6cf89143a3c2" + }, + "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/te%25st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-f94b11b5128e5047b62c3533e2dfd11c-2ee467d265092940-00", + "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": "f2c4d407e8fe5e2d3638079ce6743b71", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "277", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:47 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fdbf8746-fd29-4fbd-9d75-e3aa87086ab9", + "x-ms-failure-cause": "gateway", + "x-ms-request-id": "fdbf8746-fd29-4fbd-9d75-e3aa87086ab9", + "x-ms-routing-request-id": "WESTUS2:20210413T022947Z:fdbf8746-fd29-4fbd-9d75-e3aa87086ab9" + }, + "ResponseBody": { + "error": { + "code": "InvalidDoubleEncodedRequestUri", + "message": "The request URI \u0027https://management.azure.com:443/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te%25st?api-version=2019-10-01\u0027 is not valid, because it contains double encoding sequence \u0027%25\u0027." + } + } + } + ], + "Variables": { + "RandomSeed": "1831767419", + "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 deleted file mode 100644 index 2dcc4bdca9c30..0000000000000 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(%%).json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "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 Core 4.6.29812.02; 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": "Tue, 30 Mar 2021 07:42:18 GMT", - "Expires": "-1", - "Pragma": "no-cache", - "Strict-Transport-Security": "max-age=31536000; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c5c60869-515d-4ba8-b89e-b934d4915fdf", - "x-ms-ratelimit-remaining-subscription-reads": "11991", - "x-ms-request-id": "c5c60869-515d-4ba8-b89e-b934d4915fdf", - "x-ms-routing-request-id": "WESTUS:20210330T074218Z:c5c60869-515d-4ba8-b89e-b934d4915fdf" - }, - "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 index a064b30e738e6..0062ca5fde93e 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null).json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "01e6d8525cf66fa8cd559809dd13cae0", + "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": "28cf16dc4de23b2f6510effce0fdac47", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:18 GMT", + "Date": "Tue, 13 Apr 2021 02:29:48 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4f446ce5-30dd-4155-a17a-902458013f47", - "x-ms-ratelimit-remaining-subscription-reads": "11992", - "x-ms-request-id": "4f446ce5-30dd-4155-a17a-902458013f47", - "x-ms-routing-request-id": "WESTUS:20210330T074218Z:4f446ce5-30dd-4155-a17a-902458013f47" + "x-ms-correlation-request-id": "896769cb-087a-47d9-8fe8-a476b6d97c9a", + "x-ms-ratelimit-remaining-subscription-reads": "11959", + "x-ms-request-id": "896769cb-087a-47d9-8fe8-a476b6d97c9a", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:896769cb-087a-47d9-8fe8-a476b6d97c9a" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -46,7 +43,7 @@ } ], "Variables": { - "RandomSeed": "2115711913", + "RandomSeed": "1493357658", "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/TestGetResourceGroupOpsArgNullException(null)Async.json similarity index 68% rename from sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%test %).json rename to sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null)Async.json index 9669fc09bb1b8..c85294e770d1f 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgException(%test %).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsArgNullException(null)Async.json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "d1c1d8a6a8e495fbc65f419f015bff71", + "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": "6b36004700210f9f6fd37661f02218ba", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:16 GMT", + "Date": "Tue, 13 Apr 2021 02:29:48 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f1dcc146-1c6d-493e-9590-d6bad77492d0", - "x-ms-ratelimit-remaining-subscription-reads": "11996", - "x-ms-request-id": "f1dcc146-1c6d-493e-9590-d6bad77492d0", - "x-ms-routing-request-id": "WESTUS:20210330T074216Z:f1dcc146-1c6d-493e-9590-d6bad77492d0" + "x-ms-correlation-request-id": "e4cbd153-4f0c-421b-867a-cb69c00f013a", + "x-ms-ratelimit-remaining-subscription-reads": "11960", + "x-ms-request-id": "e4cbd153-4f0c-421b-867a-cb69c00f013a", + "x-ms-routing-request-id": "WESTUS2:20210413T022948Z:e4cbd153-4f0c-421b-867a-cb69c00f013a" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -46,7 +43,7 @@ } ], "Variables": { - "RandomSeed": "1253891996", + "RandomSeed": "1380960983", "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" } } \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsEmptyString(%%).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsEmptyString(%%).json new file mode 100644 index 0000000000000..d571e6959fcbf --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsEmptyString(%%).json @@ -0,0 +1,126 @@ +{ + "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": "d3471312a7f4d1708079d7d31817ab87", + "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": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bc3ab4f6-9bf0-4852-958b-35b466ca163e", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "bc3ab4f6-9bf0-4852-958b-35b466ca163e", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:bc3ab4f6-9bf0-4852-958b-35b466ca163e" + }, + "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/?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-3bfa5443644a8842864881b4632fe4e4-9ad80a10614f6b47-00", + "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": "1e575e431c67eac9427a4bf27891abc7", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1217", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "efd42169-393a-42ba-b17e-4089246989a7", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "efd42169-393a-42ba-b17e-4089246989a7", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:efd42169-393a-42ba-b17e-4089246989a7" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/AzSecPackAutoConfigRG", + "name": "AzSecPackAutoConfigRG", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/AutoRestResources2", + "name": "AutoRestResources2", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia", + "name": "Default-Storage-EastAsia", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastasia", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS", + "name": "Default-Storage-EastUS", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS", + "name": "Default-Storage-WestUS", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + ] + } + } + ], + "Variables": { + "RandomSeed": "1486266725", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsEmptyString(%%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsEmptyString(%%)Async.json new file mode 100644 index 0000000000000..626fbea32ff30 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsEmptyString(%%)Async.json @@ -0,0 +1,126 @@ +{ + "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": "292954c4102f2c6079dc5d9dc7d1ab77", + "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": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1fefff0c-23f0-4577-aa6c-c8fe6e491ed3", + "x-ms-ratelimit-remaining-subscription-reads": "11958", + "x-ms-request-id": "1fefff0c-23f0-4577-aa6c-c8fe6e491ed3", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:1fefff0c-23f0-4577-aa6c-c8fe6e491ed3" + }, + "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/?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-4b470d3aee804c4f9c90e48594c6ff0d-ac6eeea4f2b1db42-00", + "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": "bdee9762b3a2cbf4843401892b7d2679", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1217", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7ac316d0-63dc-4516-a0a8-659a6036ddec", + "x-ms-ratelimit-remaining-subscription-reads": "11957", + "x-ms-request-id": "7ac316d0-63dc-4516-a0a8-659a6036ddec", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:7ac316d0-63dc-4516-a0a8-659a6036ddec" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/AzSecPackAutoConfigRG", + "name": "AzSecPackAutoConfigRG", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/AutoRestResources2", + "name": "AutoRestResources2", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastAsia", + "name": "Default-Storage-EastAsia", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastasia", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-EastUS", + "name": "Default-Storage-EastUS", + "type": "Microsoft.Resources/resourceGroups", + "location": "eastus", + "properties": { + "provisioningState": "Succeeded" + } + }, + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/Default-Storage-WestUS", + "name": "Default-Storage-WestUS", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "properties": { + "provisioningState": "Succeeded" + } + } + ] + } + } + ], + "Variables": { + "RandomSeed": "2024910370", + "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 index 269c2b1b11a71..e24c6a7775f3e 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89).json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "c58d547f528241f50c1a1ccd63a62005", + "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": "93871e8a83cd602e07a6e762627b2030", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:18 GMT", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "782672b9-0846-43e7-a1ab-4d7590addacb", - "x-ms-ratelimit-remaining-subscription-reads": "11990", - "x-ms-request-id": "782672b9-0846-43e7-a1ab-4d7590addacb", - "x-ms-routing-request-id": "WESTUS:20210330T074218Z:782672b9-0846-43e7-a1ab-4d7590addacb" + "x-ms-correlation-request-id": "da2007c0-07c7-40f0-bebd-ef326dccbd01", + "x-ms-ratelimit-remaining-subscription-reads": "11956", + "x-ms-request-id": "da2007c0-07c7-40f0-bebd-ef326dccbd01", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:da2007c0-07c7-40f0-bebd-ef326dccbd01" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-41a03d9bab6cd74bbb818d639fd4810d-f40384dc9da48e49-00", + "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": "9c2ba56fa5a504ec33784c686473bbe0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "181", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b1e831af-f88f-4211-b4a6-2ae953f28710", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11955", + "x-ms-request-id": "b1e831af-f88f-4211-b4a6-2ae953f28710", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:b1e831af-f88f-4211-b4a6-2ae953f28710" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027 could not be found." + } + } } ], "Variables": { - "RandomSeed": "155668133", + "RandomSeed": "1104632284", "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)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89)Async.json new file mode 100644 index 0000000000000..6496ada352321 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(89)Async.json @@ -0,0 +1,85 @@ +{ + "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", + "traceparent": "00-1c079d33f18d704988950eb63e5cd8c2-adf6500eb5f8ef45-00", + "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": "7837a659109b27a2e222cd188451ed71", + "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": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8f71cc15-3026-4d9e-b191-ce2a9439a7e2", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "8f71cc15-3026-4d9e-b191-ce2a9439a7e2", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:8f71cc15-3026-4d9e-b191-ce2a9439a7e2" + }, + "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/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0071f2b6d6816d4198fa469df4a37a55-e8bb0f2a67619348-00", + "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": "ed252f55242cb8570ce6b7cf0d3ecb29", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "181", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "45d98f6f-ae6d-4ed0-8d2b-44ba6a624e1b", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11954", + "x-ms-request-id": "45d98f6f-ae6d-4ed0-8d2b-44ba6a624e1b", + "x-ms-routing-request-id": "WESTUS2:20210413T022949Z:45d98f6f-ae6d-4ed0-8d2b-44ba6a624e1b" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1623390979", + "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 index 29d188d5bb04e..dbd416aad53ad 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90).json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "5028d6f19b001f95ea1d0c6bc5f2da9a", + "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": "c946604a620fe3deeb3a5135070edad4", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:18 GMT", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cfc9532a-6bd1-4140-a4ae-f874f97c0168", - "x-ms-ratelimit-remaining-subscription-reads": "11989", - "x-ms-request-id": "cfc9532a-6bd1-4140-a4ae-f874f97c0168", - "x-ms-routing-request-id": "WESTUS:20210330T074218Z:cfc9532a-6bd1-4140-a4ae-f874f97c0168" + "x-ms-correlation-request-id": "077f2d31-8e5c-4416-a452-ae412a85d9fe", + "x-ms-ratelimit-remaining-subscription-reads": "11953", + "x-ms-request-id": "077f2d31-8e5c-4416-a452-ae412a85d9fe", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:077f2d31-8e5c-4416-a452-ae412a85d9fe" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-71547039479fdd45ba44f0b73e400bfc-6730071f79b43f47-00", + "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": "179faa4df69ea1a863d4a430db485a74", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "182", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "671049a5-16b7-4f00-8791-3c74ca04e1f3", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11952", + "x-ms-request-id": "671049a5-16b7-4f00-8791-3c74ca04e1f3", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:671049a5-16b7-4f00-8791-3c74ca04e1f3" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027 could not be found." + } + } } ], "Variables": { - "RandomSeed": "1031501803", + "RandomSeed": "1441822309", "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)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90)Async.json new file mode 100644 index 0000000000000..2bbf90213cc97 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsLong(90)Async.json @@ -0,0 +1,84 @@ +{ + "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": "58ae6a7ec2555f32b98b43819656a7f5", + "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": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9da5f7b7-5563-4547-803a-6fb75372f676", + "x-ms-ratelimit-remaining-subscription-reads": "11951", + "x-ms-request-id": "9da5f7b7-5563-4547-803a-6fb75372f676", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:9da5f7b7-5563-4547-803a-6fb75372f676" + }, + "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/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1bb2492ccb9aa84598c7274e339700c8-f10b2e7ab2ece44b-00", + "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": "ccc9a68da39b2468c0b798c6eaea6120", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "182", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fcd0149d-9526-4c90-a88b-ce19d674756a", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11950", + "x-ms-request-id": "fcd0149d-9526-4c90-a88b-ce19d674756a", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:fcd0149d-9526-4c90-a88b-ce19d674756a" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "890384647", + "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 index 1e912bd72a39d..5d79998101260 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91).json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "ef9767a56046f5b135c223c111880a97", + "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": "a9bd236f16c91b6dc2acc79d26139459", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:18 GMT", + "Date": "Tue, 13 Apr 2021 02:29:50 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b16eef7e-0842-497f-aabb-e2e64e2de9aa", - "x-ms-ratelimit-remaining-subscription-reads": "11988", - "x-ms-request-id": "b16eef7e-0842-497f-aabb-e2e64e2de9aa", - "x-ms-routing-request-id": "WESTUS:20210330T074218Z:b16eef7e-0842-497f-aabb-e2e64e2de9aa" + "x-ms-correlation-request-id": "9eb89f3d-8e72-4ade-9f0e-6bf5cdb154b1", + "x-ms-ratelimit-remaining-subscription-reads": "11949", + "x-ms-request-id": "9eb89f3d-8e72-4ade-9f0e-6bf5cdb154b1", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:9eb89f3d-8e72-4ade-9f0e-6bf5cdb154b1" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d33810fa42c7484992f959e6dad6bc7d-fe5c9fa14c645843-00", + "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": "0b432191750c0fb917a58b26b8f3ef6c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "243", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2a56462d-d39c-4711-98d7-d72d0da83b2d", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11948", + "x-ms-request-id": "2a56462d-d39c-4711-98d7-d72d0da83b2d", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:2a56462d-d39c-4711-98d7-d72d0da83b2d" + }, + "ResponseBody": { + "error": { + "code": "InvalidResourceGroup", + "message": "The provided resource group name \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027 has a length of \u002791\u0027 which exceeds the maximum length of \u002790\u0027." + } + } } ], "Variables": { - "RandomSeed": "1532791965", + "RandomSeed": "708815977", "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)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91)Async.json new file mode 100644 index 0000000000000..06d2ed1137d39 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsOutOfRangeArgException(91)Async.json @@ -0,0 +1,84 @@ +{ + "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": "ff10983f9778e3c1430f82cb2d2c977a", + "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": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c5d41167-9c7a-444b-84dd-30b5ea2cc265", + "x-ms-ratelimit-remaining-subscription-reads": "11947", + "x-ms-request-id": "c5d41167-9c7a-444b-84dd-30b5ea2cc265", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:c5d41167-9c7a-444b-84dd-30b5ea2cc265" + }, + "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/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-fd71a8ebd60ba1488cfa6dbc64a1d1b1-7047da977e05f149-00", + "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": "735e881389e2c6b34ca55a7f3c7e6cd9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "243", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6fdc8213-ae0f-4ef0-8572-936339be2e3d", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11946", + "x-ms-request-id": "6fdc8213-ae0f-4ef0-8572-936339be2e3d", + "x-ms-routing-request-id": "WESTUS2:20210413T022950Z:6fdc8213-ae0f-4ef0-8572-936339be2e3d" + }, + "ResponseBody": { + "error": { + "code": "InvalidResourceGroup", + "message": "The provided resource group name \u0027aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\u0027 has a length of \u002791\u0027 which exceeds the maximum length of \u002790\u0027." + } + } + } + ], + "Variables": { + "RandomSeed": "1128736986", + "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 index 493416a334415..ee55a27f4c0cc 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%).json @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "c667b5ea94692fdf8bcc822d1258f39a", + "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": "86ff5b7a661d1bf73a7f53efc3f34194", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:19 GMT", + "Date": "Tue, 13 Apr 2021 02:29:52 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "03da4fb3-b1bb-423a-94fb-740fc65bc305", - "x-ms-ratelimit-remaining-subscription-reads": "11985", - "x-ms-request-id": "03da4fb3-b1bb-423a-94fb-740fc65bc305", - "x-ms-routing-request-id": "WESTUS:20210330T074219Z:03da4fb3-b1bb-423a-94fb-740fc65bc305" + "x-ms-correlation-request-id": "5867d07a-b04d-4d0f-929a-e79207c08141", + "x-ms-ratelimit-remaining-subscription-reads": "11935", + "x-ms-request-id": "5867d07a-b04d-4d0f-929a-e79207c08141", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:5867d07a-b04d-4d0f-929a-e79207c08141" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/t?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-46391ac2f5e1394b94558e7737a84efa-1aadd7a121c0f040-00", + "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": "a46d19f7e4d78e9d3e6122a611762277", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "93", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "74ad8d0e-fd6b-49b0-ba60-7a0d6f6d0656", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11934", + "x-ms-request-id": "74ad8d0e-fd6b-49b0-ba60-7a0d6f6d0656", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:74ad8d0e-fd6b-49b0-ba60-7a0d6f6d0656" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027t\u0027 could not be found." + } + } } ], "Variables": { - "RandomSeed": "1286893929", + "RandomSeed": "1622339356", "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%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%)Async.json new file mode 100644 index 0000000000000..f7d450d27db91 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%t%)Async.json @@ -0,0 +1,84 @@ +{ + "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": "9a42c0722a63be5fb11c995109a305e0", + "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": "Tue, 13 Apr 2021 02:29:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c5195de8-3ff3-4c6c-99ad-f1c19b9f435c", + "x-ms-ratelimit-remaining-subscription-reads": "11933", + "x-ms-request-id": "c5195de8-3ff3-4c6c-99ad-f1c19b9f435c", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:c5195de8-3ff3-4c6c-99ad-f1c19b9f435c" + }, + "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/t?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-758c01dcb59dfc42a9f0a98da7c638c0-3883b9b373b7c141-00", + "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": "a8641f0864e12d50bac9bb4f31bb5603", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "93", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7c3bde41-326c-44fe-8f40-f2eb886ef1a4", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11932", + "x-ms-request-id": "7c3bde41-326c-44fe-8f40-f2eb886ef1a4", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:7c3bde41-326c-44fe-8f40-f2eb886ef1a4" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027t\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "255761237", + "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 index 51ecb0cc21bed..986d266f5cb6f 100644 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%).json +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%).json @@ -6,11 +6,9 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "f4b2532a06941ba2141073373e5eea74", + "traceparent": "00-70ebb112aaa16441b6faea5cf3d9ba9c-09fe85ed05a05a43-00", + "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": "7077d2675ebb4118a5274ff5e702cccb", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +17,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:19 GMT", + "Date": "Tue, 13 Apr 2021 02:29:51 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "43d20487-7c2f-46e3-9868-c4b33c87c882", - "x-ms-ratelimit-remaining-subscription-reads": "11986", - "x-ms-request-id": "43d20487-7c2f-46e3-9868-c4b33c87c882", - "x-ms-routing-request-id": "WESTUS:20210330T074219Z:43d20487-7c2f-46e3-9868-c4b33c87c882" + "x-ms-correlation-request-id": "7432e04f-0dd1-4526-8ae9-52d517408a35", + "x-ms-ratelimit-remaining-subscription-reads": "11938", + "x-ms-request-id": "7432e04f-0dd1-4526-8ae9-52d517408a35", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:7432e04f-0dd1-4526-8ae9-52d517408a35" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +41,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e86135fb8572be47bc1f458aa32938ff-3f3076733bdfbf41-00", + "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": "8bc845248a0e44cfd0d7ab5f8b6b09c1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "94", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "77f198f8-43ec-459d-a5d5-b805ebaa20fb", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11937", + "x-ms-request-id": "77f198f8-43ec-459d-a5d5-b805ebaa20fb", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:77f198f8-43ec-459d-a5d5-b805ebaa20fb" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027te\u0027 could not be found." + } + } } ], "Variables": { - "RandomSeed": "1017488050", + "RandomSeed": "933777440", "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%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%)Async.json new file mode 100644 index 0000000000000..c75dd7cd4925d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te%)Async.json @@ -0,0 +1,85 @@ +{ + "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", + "Request-Id": "|f83cf1bf-453d2fbfc0ff37bc.", + "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": "0fa73d00e1e5e1bfd318a9b3a8574b4c", + "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": "Tue, 13 Apr 2021 02:29:52 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5b229f13-e4b9-41f5-83f1-0781a30c6c7c", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "5b229f13-e4b9-41f5-83f1-0781a30c6c7c", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:5b229f13-e4b9-41f5-83f1-0781a30c6c7c" + }, + "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/te?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-27f3e7f632771848b7bf4772f7dd6b34-3a2e5884346e0344-00", + "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": "7058e1f77bada76a48b39cf007fb3bbd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "94", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1009b7c1-5dfa-4b02-b5ab-b4facfe3b409", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11936", + "x-ms-request-id": "1009b7c1-5dfa-4b02-b5ab-b4facfe3b409", + "x-ms-routing-request-id": "WESTUS2:20210413T022952Z:1009b7c1-5dfa-4b02-b5ab-b4facfe3b409" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027te\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1527411214", + "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 index 536b370f37015..6e84e4f76652d 100644 --- 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 @@ -6,11 +6,8 @@ "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "User-Agent": [ - "azsdk-net-ResourceManager.Resources/1.0.0-preview.2", - "(.NET Core 4.6.29812.02; Microsoft Windows 10.0.19042 )" - ], - "x-ms-client-request-id": "57a27a700719b782466a84333b7e9d64", + "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": "4ada30f467aad2eb340abb356650c3b6", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -19,15 +16,15 @@ "Cache-Control": "no-cache", "Content-Length": "397", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 30 Mar 2021 07:42:19 GMT", + "Date": "Tue, 13 Apr 2021 02:29:51 GMT", "Expires": "-1", "Pragma": "no-cache", "Strict-Transport-Security": "max-age=31536000; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d24002dd-3d1d-49f9-b42a-f80d77383d6b", - "x-ms-ratelimit-remaining-subscription-reads": "11987", - "x-ms-request-id": "d24002dd-3d1d-49f9-b42a-f80d77383d6b", - "x-ms-routing-request-id": "WESTUS:20210330T074219Z:d24002dd-3d1d-49f9-b42a-f80d77383d6b" + "x-ms-correlation-request-id": "871287b3-ff92-4f9a-a9dc-c4a1d80032f6", + "x-ms-ratelimit-remaining-subscription-reads": "11941", + "x-ms-request-id": "871287b3-ff92-4f9a-a9dc-c4a1d80032f6", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:871287b3-ff92-4f9a-a9dc-c4a1d80032f6" }, "ResponseBody": { "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", @@ -43,10 +40,45 @@ "spendingLimit": "Off" } } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/te.st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-281243e7fc618042819fed094972222c-e4eea6385ee78145-00", + "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": "66f3347db807e56df6462ece67be2368", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "97", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ac64a0d3-ea72-4429-9766-d92e023d7a33", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11940", + "x-ms-request-id": "ac64a0d3-ea72-4429-9766-d92e023d7a33", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:ac64a0d3-ea72-4429-9766-d92e023d7a33" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027te.st\u0027 could not be found." + } + } } ], "Variables": { - "RandomSeed": "1638097707", + "RandomSeed": "125727916", "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%)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te.st%)Async.json new file mode 100644 index 0000000000000..51885b642a16d --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%te.st%)Async.json @@ -0,0 +1,84 @@ +{ + "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": "d9eefb4001a25d0fef793fe0f5c591a7", + "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": "Tue, 13 Apr 2021 02:29:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "009709db-04d3-4826-9c04-37b623368f2e", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "009709db-04d3-4826-9c04-37b623368f2e", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:009709db-04d3-4826-9c04-37b623368f2e" + }, + "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/te.st?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e5f5cd99bce567408e3d71d5788cfaf6-c4c502b146b4284a-00", + "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": "d7e4dd052ab502ae1856322890279c29", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "97", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d13ace1c-a363-4649-ac47-93b82646f7dc", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11939", + "x-ms-request-id": "d13ace1c-a363-4649-ac47-93b82646f7dc", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:d13ace1c-a363-4649-ac47-93b82646f7dc" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027te.st\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1190221189", + "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(%test %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%test %).json new file mode 100644 index 0000000000000..76e20aca27b70 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%test %).json @@ -0,0 +1,84 @@ +{ + "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": "d060c6e10cdb8a9a33c75b5da5c69d6e", + "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": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "126feaa7-32f8-4889-83a8-2ab4bf143303", + "x-ms-ratelimit-remaining-subscription-reads": "11945", + "x-ms-request-id": "126feaa7-32f8-4889-83a8-2ab4bf143303", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:126feaa7-32f8-4889-83a8-2ab4bf143303" + }, + "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/test%20?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-f310b27faca1ee47b12d450b63e8c16e-237c0fa3ec4e9648-00", + "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": "261732304713691bf136fdb7dca1d6c5", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "96", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "122f7ea2-a24c-462c-9b1e-c7fb086b309b", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11944", + "x-ms-request-id": "122f7ea2-a24c-462c-9b1e-c7fb086b309b", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:122f7ea2-a24c-462c-9b1e-c7fb086b309b" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027test\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "1516865501", + "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(%test %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%test %)Async.json new file mode 100644 index 0000000000000..b08d5127faf33 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/SubscriptionOperationsTests/TestGetResourceGroupOpsValid(%test %)Async.json @@ -0,0 +1,84 @@ +{ + "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": "2b1d470fdac555d158f02eb74ef6af7b", + "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": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "623a5c41-4854-475c-bb0c-cc7b26a63adc", + "x-ms-ratelimit-remaining-subscription-reads": "11943", + "x-ms-request-id": "623a5c41-4854-475c-bb0c-cc7b26a63adc", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:623a5c41-4854-475c-bb0c-cc7b26a63adc" + }, + "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/test%20?api-version=2019-10-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-bd3f13dd35d9554ea3921be715efa564-32ac85f0bf154443-00", + "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": "9e78265c54055e9fce311c362921e79d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "96", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 13 Apr 2021 02:29:50 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8919b7b1-71e2-47dd-9fa0-fd0ba3607392", + "x-ms-failure-cause": "gateway", + "x-ms-ratelimit-remaining-subscription-reads": "11942", + "x-ms-request-id": "8919b7b1-71e2-47dd-9fa0-fd0ba3607392", + "x-ms-routing-request-id": "WESTUS2:20210413T022951Z:8919b7b1-71e2-47dd-9fa0-fd0ba3607392" + }, + "ResponseBody": { + "error": { + "code": "ResourceGroupNotFound", + "message": "Resource group \u0027test\u0027 could not be found." + } + } + } + ], + "Variables": { + "RandomSeed": "75412303", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file