diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs new file mode 100644 index 000000000000..dd77990b9dde --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/Scenario/ResourceGroupBuilderTests.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.ResourceManager.Core.Tests +{ + public class ResourceGroupBuilderTests : ResourceManagerTestBase + { + public ResourceGroupBuilderTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + [TestCase(null)] + [TestCase(" ")] + [RecordedTest] + public void CreateOrUpdate(string value) + { + Assert.ThrowsAsync(async () => _ = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).CreateOrUpdateAsync(value)); + } + + [TestCase(null)] + [TestCase(" ")] + [RecordedTest] + public void StartCreateOrUpdate(string value) + { + Assert.ThrowsAsync(async () => + { + var createOp = await Client.DefaultSubscription.GetResourceGroups().Construct(LocationData.WestUS2).StartCreateOrUpdateAsync(value); + _ = await createOp.WaitForCompletionAsync(); + }); + } + + [TestCase] + [RecordedTest] + public void Build() + { + var location = LocationData.WestUS2; + var tags = new Dictionary() + { + { "key", "value"} + }; + var managedBy = "managedBy"; + var rgData = Client.DefaultSubscription.GetResourceGroups().Construct(location, tags, managedBy).Build(); + Assert.AreEqual(location, rgData.Location); + Assert.AreEqual(tags, rgData.Tags); + Assert.AreEqual(managedBy, rgData.ManagedBy); + } + } +} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json new file mode 100644 index 000000000000..e1e0bca0b888 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build().json @@ -0,0 +1,53 @@ +{ + "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.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "cbbc56e8898ecfb1ef80d7b8c3666698", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5e82d327-8c17-42bd-92f2-d94962e2ce18", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "5e82d327-8c17-42bd-92f2-d94962e2ce18", + "x-ms-routing-request-id": "WESTUS2:20210616T023014Z:5e82d327-8c17-42bd-92f2-d94962e2ce18" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "1689414197", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json new file mode 100644 index 000000000000..99c5b0a1f770 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/Build()Async.json @@ -0,0 +1,53 @@ +{ + "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.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "87fb2e950f020a11d2dee2b4b46efaf4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:13 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "701f1e03-28cc-4b41-807d-ca95898a77af", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "701f1e03-28cc-4b41-807d-ca95898a77af", + "x-ms-routing-request-id": "WESTUS2:20210616T023014Z:701f1e03-28cc-4b41-807d-ca95898a77af" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "1270258160", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json new file mode 100644 index 000000000000..ac973b09f082 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %).json @@ -0,0 +1,53 @@ +{ + "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.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e16896e2-8e1a-44b4-b76b-8b76e9926a48", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "e16896e2-8e1a-44b4-b76b-8b76e9926a48", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:e16896e2-8e1a-44b4-b76b-8b76e9926a48" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "608171253", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json new file mode 100644 index 000000000000..d977a5819138 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(% %)Async.json @@ -0,0 +1,53 @@ +{ + "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.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "5da32cdbee442f53ad78aa1728c3cddc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "09bb05b8-10d9-4180-855c-7adc75458c96", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "09bb05b8-10d9-4180-855c-7adc75458c96", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:09bb05b8-10d9-4180-855c-7adc75458c96" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "608171253", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json new file mode 100644 index 000000000000..f866a40b4d46 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null).json @@ -0,0 +1,53 @@ +{ + "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.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "487be0b0ab2f46a52df414be3ca55843", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7583e0db-b578-47a9-98de-11f86e26c639", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "7583e0db-b578-47a9-98de-11f86e26c639", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:7583e0db-b578-47a9-98de-11f86e26c639" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "451162049", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json new file mode 100644 index 000000000000..a137c4b67ede --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/CreateOrUpdate(null)Async.json @@ -0,0 +1,53 @@ +{ + "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.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "487be0b0ab2f46a52df414be3ca55843", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 02:30:38 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "58573bc2-44f5-4b29-820a-4f26b35e69b1", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "58573bc2-44f5-4b29-820a-4f26b35e69b1", + "x-ms-routing-request-id": "WESTUS2:20210616T023039Z:58573bc2-44f5-4b29-820a-4f26b35e69b1" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "451162049", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json new file mode 100644 index 000000000000..193724b45b34 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %).json @@ -0,0 +1,54 @@ +{ + "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-6f7bae901097a94cbc7fc6bebf3356f9-c8cd8c94c816314e-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e844ae4d35c20df28b6f9ab57c0f8770", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "46d786e0-715d-4436-998b-4f46efe1527e", + "x-ms-ratelimit-remaining-subscription-reads": "11934", + "x-ms-request-id": "46d786e0-715d-4436-998b-4f46efe1527e", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:46d786e0-715d-4436-998b-4f46efe1527e" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "1484004923", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json new file mode 100644 index 000000000000..c52428b2917b --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(% %)Async.json @@ -0,0 +1,54 @@ +{ + "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-50fe7f7058a7614998acd51376aaabcc-99bb22ad491af947-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "2bab98b8eb01e162943c21199833f4e4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5e3150dc-7ad9-4153-83ab-c2bd283c4644", + "x-ms-ratelimit-remaining-subscription-reads": "11933", + "x-ms-request-id": "5e3150dc-7ad9-4153-83ab-c2bd283c4644", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:5e3150dc-7ad9-4153-83ab-c2bd283c4644" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "1371608248", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json new file mode 100644 index 000000000000..6c2cfa794bd7 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null).json @@ -0,0 +1,54 @@ +{ + "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-b4605b7fbaed1e418af9b0ae90028b3c-cb08c0be93843746-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "e7e4706570751cc2779b2c148b3b8840", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "749c65b3-8986-4426-bc4e-5b22d00b5267", + "x-ms-ratelimit-remaining-subscription-reads": "11936", + "x-ms-request-id": "749c65b3-8986-4426-bc4e-5b22d00b5267", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:749c65b3-8986-4426-bc4e-5b22d00b5267" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "952452211", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json new file mode 100644 index 000000000000..98120ae743e6 --- /dev/null +++ b/sdk/resourcemanager/Azure.ResourceManager.Core/tests/SessionRecords/ResourceGroupBuilderTests/StartCreateOrUpdate(null)Async.json @@ -0,0 +1,54 @@ +{ + "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-a6ed159fce2741449c04d1d09be6f69f-bf7613da38affe4a-00", + "User-Agent": "azsdk-net-ResourceManager.Core/1.0.0-alpha.20210615.1 (.NET Framework 4.8.4300.0; Microsoft Windows 10.0.19043 )", + "x-ms-client-request-id": "193c427039055be3a4ab23b30c9e6068", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "450", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 16 Jun 2021 01:20:57 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "de211af6-4cc5-42d0-906f-72e7aeec6784", + "x-ms-ratelimit-remaining-subscription-reads": "11935", + "x-ms-request-id": "de211af6-4cc5-42d0-906f-72e7aeec6784", + "x-ms-routing-request-id": "WESTUS2:20210616T012057Z:de211af6-4cc5-42d0-906f-72e7aeec6784" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "tagKey1": "tagValue1", + "tagKey2": "tagValue2" + }, + "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": "720567928", + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} \ No newline at end of file