From 43f39e51429e45d7a31fb01d589d1ad913beba04 Mon Sep 17 00:00:00 2001 From: Rogelio Delgadillo <35089121+r-delgadillo@users.noreply.github.com> Date: Tue, 30 Oct 2018 16:45:22 -0700 Subject: [PATCH] Add ARM endpoint, update model responses/inputs, update tests (#4909) --- .../Helpers/IotCentralTestUtilities.cs | 10 +- .../ScenarioTests/IotCentralLifeCycleTests.cs | 73 ++- .../ScenarioTests/IotCentralTestBase.cs | 26 +- .../TestIotCentralCreateLifeCycle.json | 584 +++++++++++++----- .../TestIotCentralUpdateLifeCycle.json | 397 ++++++------ .../Generated/AppsOperations.cs | 212 ++++++- .../Generated/AppsOperationsExtensions.cs | 54 +- .../Generated/IAppsOperations.cs | 30 +- ...labilityInfo.cs => AppAvailabilityInfo.cs} | 24 +- .../Models/AppNameUnavailabilityReason.cs | 60 -- .../Generated/Models/ErrorDetails.cs | 22 +- .../Generated/Models/ErrorResponseBody.cs | 78 +++ .../Generated/Models/OperationInputs.cs | 18 +- .../Generated/SdkInfo_IotCentralClient.cs | 11 + ...crosoft.Azure.Management.IotCentral.csproj | 6 +- .../Properties/AssemblyInfo.cs | 4 +- .../_metadata/iotcentral_resource-manager.txt | 16 +- 17 files changed, 1117 insertions(+), 508 deletions(-) rename src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/{AppNameAvailabilityInfo.cs => AppAvailabilityInfo.cs} (65%) delete mode 100644 src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameUnavailabilityReason.cs create mode 100644 src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorResponseBody.cs diff --git a/src/SDKs/IotCentral/IotCentral.Tests/Helpers/IotCentralTestUtilities.cs b/src/SDKs/IotCentral/IotCentral.Tests/Helpers/IotCentralTestUtilities.cs index 6eb2622dfb831..864d0205c7378 100644 --- a/src/SDKs/IotCentral/IotCentral.Tests/Helpers/IotCentralTestUtilities.cs +++ b/src/SDKs/IotCentral/IotCentral.Tests/Helpers/IotCentralTestUtilities.cs @@ -14,11 +14,13 @@ namespace IotCentral.Tests.Helpers public class IotCentralTestUtilities { public static string DefaultLocation = "WestUS"; - public static string DefaultIotCentralName = "dotnetsdkapp"; - public static string DefaultUpdateIotCentralName = "dotnetsdkapppdate"; + public static string DefaultResourceName = "dotnetsdkapp"; + public static string DefaultUpdateResourceName = "dotnetsdkappupdate"; + public static string DefaultSubdomain = "dotnetsdksubdomain"; + public static string DefaultUpdateSubdomain = "dotnetsdksubdomainupdate"; public static string DefaultResourceGroupName = "DotNetSdkIotCentralRG"; - public static string DefaultUpdateResourceGroupName = "UpdateDotNetSdkIotCentralRG"; - + public static string DefaultUpdateResourceGroupName = "DotNetSdkIotCentralRGUpdate"; + public static IotCentralClient GetIotCentralClient(MockContext context, RecordedDelegatingHandler handler = null) { if (handler != null) diff --git a/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralLifeCycleTests.cs b/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralLifeCycleTests.cs index f691cfdd8ce98..dcc0ad6fd5be0 100644 --- a/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralLifeCycleTests.cs +++ b/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralLifeCycleTests.cs @@ -27,31 +27,32 @@ public void TestIotCentralCreateLifeCycle() // Create Resource Group var resourceGroup = CreateResourceGroup(IotCentralTestUtilities.DefaultResourceGroupName); - // Check if App Exists and Delete - DeleteAppIfExists(IotCentralTestUtilities.DefaultResourceGroupName, IotCentralTestUtilities.DefaultIotCentralName); - // Create App - var app = CreateIotCentral(resourceGroup, IotCentralTestUtilities.DefaultLocation, IotCentralTestUtilities.DefaultIotCentralName); + var app = CreateIotCentral(resourceGroup, IotCentralTestUtilities.DefaultLocation, IotCentralTestUtilities.DefaultResourceName, IotCentralTestUtilities.DefaultSubdomain); + + // Validate resourceName and subdomain are taken + this.CheckAppNameAndSubdomainTaken(app.Name, app.Subdomain); Assert.NotNull(app); Assert.Equal(AppSku.S1, app.Sku.Name); - Assert.Equal(IotCentralTestUtilities.DefaultIotCentralName, app.Name); + Assert.Equal(IotCentralTestUtilities.DefaultResourceName, app.Name); + Assert.Equal(IotCentralTestUtilities.DefaultSubdomain, app.Subdomain); // Add and Get Tags IDictionary tags = new Dictionary - { - { "key1", "value1" }, - { "key2", "value2" } - }; + { + { "key1", "value1" }, + { "key2", "value2" } + }; var appPatch = new AppPatch() { Tags = tags, - DisplayName = IotCentralTestUtilities.DefaultIotCentralName, - Subdomain = IotCentralTestUtilities.DefaultIotCentralName + DisplayName = IotCentralTestUtilities.DefaultResourceName, + Subdomain = IotCentralTestUtilities.DefaultSubdomain }; - app = this.iotCentralClient.Apps.Update(IotCentralTestUtilities.DefaultResourceGroupName, IotCentralTestUtilities.DefaultIotCentralName, appPatch); + app = this.iotCentralClient.Apps.Update(IotCentralTestUtilities.DefaultResourceGroupName, IotCentralTestUtilities.DefaultResourceName, appPatch); Assert.NotNull(app); Assert.True(app.Tags.Count().Equals(2)); @@ -86,43 +87,53 @@ public void TestIotCentralUpdateLifeCycle() // Create Resource Group var resourceGroup = CreateResourceGroup(IotCentralTestUtilities.DefaultUpdateResourceGroupName); - // Check if App Exists and Delete - DeleteAppIfExists(IotCentralTestUtilities.DefaultUpdateResourceGroupName, IotCentralTestUtilities.DefaultUpdateIotCentralName); - // Create App - var app = CreateIotCentral(resourceGroup, IotCentralTestUtilities.DefaultLocation, IotCentralTestUtilities.DefaultUpdateIotCentralName); + var app = CreateIotCentral(resourceGroup, IotCentralTestUtilities.DefaultLocation, IotCentralTestUtilities.DefaultUpdateResourceName, IotCentralTestUtilities.DefaultUpdateSubdomain); + + // Validate resourceName and subdomain are taken + this.CheckAppNameAndSubdomainTaken(app.Name, app.Subdomain); // Update App var newSubDomain = "test-updated-sub-domain"; var newDisplayName = "test-updated-display-name"; + // Add and Get Tags + IDictionary tags = new Dictionary + { + { "key1", "value1" }, + { "key2", "value2" } + }; - app.Subdomain = newSubDomain; - app.DisplayName = newDisplayName; - app = UpdateIotCentral(resourceGroup, app, IotCentralTestUtilities.DefaultUpdateIotCentralName); + AppPatch appPatch = new AppPatch() + { + Tags = tags, + DisplayName = newDisplayName, + Subdomain = newSubDomain + }; + + app = UpdateIotCentral(resourceGroup, appPatch, IotCentralTestUtilities.DefaultUpdateResourceName); // List apps app = iotCentralClient.Apps.ListByResourceGroup(IotCentralTestUtilities.DefaultUpdateResourceGroupName) - .FirstOrDefault(e => e.Name.Equals(IotCentralTestUtilities.DefaultUpdateIotCentralName, StringComparison.OrdinalIgnoreCase)); + .FirstOrDefault(e => e.Name.Equals(IotCentralTestUtilities.DefaultUpdateResourceName, StringComparison.OrdinalIgnoreCase)); Assert.NotNull(app); Assert.Equal(newDisplayName, app.DisplayName); - Assert.Equal(newSubDomain, app.Subdomain); + Assert.True(app.Tags.Count().Equals(2)); + Assert.Equal("value2", app.Tags["key2"]); } } - private void DeleteAppIfExists(string resourceGroupName, string name) + private void CheckAppNameAndSubdomainTaken(string resourceName, string subdomain) { - var info = iotCentralClient.Apps.CheckNameAvailability(name); - if (info.NameAvailable != true) - { - iotCentralClient.Apps.Delete( - resourceGroupName, - name); + OperationInputs resourceNameInputs = new OperationInputs(resourceName, "IoTApps"); + OperationInputs subdomainInputs = new OperationInputs(subdomain, "IoTApps"); - info = iotCentralClient.Apps.CheckNameAvailability(name); - } + // check if names are available + var resourceNameResult = iotCentralClient.Apps.CheckNameAvailability(resourceNameInputs); + var subdomainResult = iotCentralClient.Apps.CheckSubdomainAvailability(subdomainInputs); - Assert.True(info.NameAvailable, "App already exists. Unable to remove it."); + Assert.False(resourceNameResult.NameAvailable); + Assert.False(subdomainResult.NameAvailable); } } } diff --git a/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralTestBase.cs b/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralTestBase.cs index caf0dd6dfb184..f68c740756f78 100644 --- a/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralTestBase.cs +++ b/src/SDKs/IotCentral/IotCentral.Tests/ScenarioTests/IotCentralTestBase.cs @@ -33,7 +33,7 @@ protected void Initialize(MockContext context) testEnv = TestEnvironmentFactory.GetTestEnvironment(); resourcesClient = IotCentralTestUtilities.GetResourceManagementClient(context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); iotCentralClient = IotCentralTestUtilities.GetIotCentralClient(context, new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK }); - + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AZURE_VM_TEST_LOCATION"))) { location = IotCentralTestUtilities.DefaultLocation; @@ -49,7 +49,7 @@ protected void Initialize(MockContext context) } } - protected App CreateIotCentral(ResourceGroup resourceGroup, string location, string appName) + protected App CreateIotCentral(ResourceGroup resourceGroup, string location, string appResourceName, string appSubdomain) { var app = new App() { @@ -58,31 +58,31 @@ protected App CreateIotCentral(ResourceGroup resourceGroup, string location, str { Name = "S1" }, - Subdomain = appName, - DisplayName = appName + Subdomain = appSubdomain, + DisplayName = appResourceName }; return this.iotCentralClient.Apps.CreateOrUpdate( resourceGroup.Name, - appName, + appResourceName, app); } - protected App UpdateIotCentral(ResourceGroup resourceGroup, App app, string appName) + protected App UpdateIotCentral(ResourceGroup resourceGroup, AppPatch app, string appResourceName) { - return this.iotCentralClient.Apps.CreateOrUpdate( + return this.iotCentralClient.Apps.Update( resourceGroup.Name, - appName, + appResourceName, app); } protected ResourceGroup CreateResourceGroup(string resourceGroupName) { - return this.resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = IotCentralTestUtilities.DefaultLocation - }); + return this.resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, + new ResourceGroup + { + Location = IotCentralTestUtilities.DefaultLocation + }); } protected void DeleteResourceGroup(string resourceGroupName) diff --git a/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralCreateLifeCycle.json b/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralCreateLifeCycle.json index d5be68544aeee..0394749db03b8 100644 --- a/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralCreateLifeCycle.json +++ b/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralCreateLifeCycle.json @@ -1,318 +1,572 @@ { "Entries": [ { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourcegroups/DotNetSdkIotCentralRG?api-version=2017-05-10", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlZ3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourcegroups/DotNetSdkIotCentralRG?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlZ3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "28" - ], "x-ms-client-request-id": [ - "ed4438fd-14f6-480a-b913-a16127822bc0" + "a340a854-1f0d-4834-b1f1-effec514ad88" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", + "FxVersion/4.6.26614.01", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG\",\r\n \"name\": \"DotNetSdkIotCentralRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { + ], "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ - "-1" - ], + "Content-Length": [ + "28" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 18 Jun 2018 18:22:58 GMT" + "Mon, 22 Oct 2018 22:28:50 GMT" ], "Pragma": [ "no-cache" ], - "Transfer-Encoding": [ - "chunked" - ], - "Vary": [ - "Accept-Encoding" - ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], "x-ms-request-id": [ - "56824684-9377-4136-937f-c02e39221a18" + "e3123517-f4c6-4ab5-bfe7-e99406b8c6ec" ], "x-ms-correlation-request-id": [ - "56824684-9377-4136-937f-c02e39221a18" + "e3123517-f4c6-4ab5-bfe7-e99406b8c6ec" ], "x-ms-routing-request-id": [ - "WESTUS:20180618T182258Z:56824684-9377-4136-937f-c02e39221a18" + "WESTUS2:20181022T222851Z:e3123517-f4c6-4ab5-bfe7-e99406b8c6ec" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" + ], + "Content-Length": [ + "195" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" ] }, - "StatusCode": 200 + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG\",\r\n \"name\": \"DotNetSdkIotCentralRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/providers/Microsoft.IoTCentral/checkNameAvailability?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"dotnetsdkapp\"\r\n}", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHA/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdksubdomain\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "30" - ], "x-ms-client-request-id": [ - "9f018dc8-8fda-4521-a0dc-dc292a68fcd2" + "045bd095-94d9-4f79-a4e9-5c9c230d7b96" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "164" ] }, - "ResponseBody": "{\r\n \"nameAvailable\": true\r\n}", "ResponseHeaders": { + "Cache-Control": [ + "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" + ], + "Date": [ + "Mon, 22 Oct 2018 22:28:59 GMT" + ], + "ETag": [ + "\"6100809c-0000-0000-0000-5bce4f2b0000\"" + ], + "x-ms-request-id": [ + "a1bb3498-c5c9-4578-b6b0-abcfe50be87f" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: 3B865D1085DB4700BE8DE026ADBD9E3C Ref B: CO1EDGE0518 Ref C: 2018-10-22T22:29:00Z" + ], + "X-Powered-By": [ + "Express" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "abb49b23-c69d-4d02-9046-72a2140a7800" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T222900Z:abb49b23-c69d-4d02-9046-72a2140a7800" + ], "Content-Length": [ - "22" + "570" ], "Content-Type": [ "application/json; charset=utf-8" - ], + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"applicationId\": \"db42e434-c1fe-4927-935f-ad41ec334e68\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomain\",\r\n \"createdDate\": \"2018-10-22T22:28:59.903Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"6100809c-0000-0000-0000-5bce4f2b0000\\\"\"\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHA/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], - "Connection": [ - "keep-alive" - ], "Date": [ - "Mon, 18 Jun 2018 18:22:59 GMT" + "Mon, 22 Oct 2018 22:29:30 GMT" ], "ETag": [ - "W/\"16-4/x+wI91pK3bZiWtoOg+Zr/n2HE\"" + "W/\"6100809c-0000-0000-0000-5bce4f2b0000\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "e88b7a86-fc63-46d7-a74a-7be1c56cbad8" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: D88C0673845F45FC957A4A3348C0BE40 Ref B: CO1EDGE0518 Ref C: 2018-10-22T22:29:30Z" ], "X-Powered-By": [ "Express" ], - "x-ms-request-id": [ - "954500cf-9ddc-4738-8f39-b8e612e5bc48" + "x-ms-correlation-request-id": [ + "cc64d866-f11e-47c1-ad7c-aaf515f08849" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T222930Z:cc64d866-f11e-47c1-ad7c-aaf515f08849" + ], + "Content-Length": [ + "570" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"applicationId\": \"db42e434-c1fe-4927-935f-ad41ec334e68\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomain\",\r\n \"createdDate\": \"2018-10-22T22:28:59.903Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"6100809c-0000-0000-0000-5bce4f2b0000\\\"\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHA/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdkapp\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"location\": \"WestUS\"\r\n}", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/providers/Microsoft.IoTCentral/checkNameAvailability?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"IoTApps\"\r\n}", "RequestHeaders": { + "x-ms-client-request-id": [ + "8ad95cf9-296a-4c3d-ad88-4bba3281dfa6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" + ], "Content-Type": [ "application/json; charset=utf-8" ], "Content-Length": [ - "158" + "52" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], + "Date": [ + "Mon, 22 Oct 2018 22:32:47 GMT" + ], + "ETag": [ + "W/\"6b-Obxvouplxe0P3Of7PGeaPXdqcas\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "9611e721-e90f-4651-ac0c-8fd57c09707f" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: C84962517C9D4602BFD0DE9D978FF150 Ref B: CO1EDGE0114 Ref C: 2018-10-22T22:32:48Z" + ], + "X-Powered-By": [ + "Express" + ], + "x-ms-correlation-request-id": [ + "c24a6cd6-33f0-46c8-89ce-1431898f3a59" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T223248Z:c24a6cd6-33f0-46c8-89ce-1431898f3a59" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"The resource name is in use\",\r\n \"message\": \"Try other variations of the name\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/providers/Microsoft.IoTCentral/checkSubdomainAvailability?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9jaGVja1N1YmRvbWFpbkF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"dotnetsdksubdomain\",\r\n \"type\": \"IoTApps\"\r\n}", + "RequestHeaders": { "x-ms-client-request-id": [ - "adda4a96-2645-4ff0-aefe-c9b4c4ae893e" + "1b2d8b62-f313-4016-9e15-f2bac4376cab" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"54d65eb0-eea2-4db8-9325-d811e7bcb3b6\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdkapp\",\r\n \"createdDate\": \"2018-06-18T18:16:01.834Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"5e007c8a-0000-0000-0000-5b27f6e10000\\\"\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "557" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ + "58" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], - "Connection": [ - "keep-alive" - ], "Date": [ - "Mon, 18 Jun 2018 18:22:59 GMT" + "Mon, 22 Oct 2018 22:32:47 GMT" ], "ETag": [ - "\"5e007c8a-0000-0000-0000-5b27f6e10000\"" + "W/\"84-kje7/MXajOLBoqSHYaXMsyUojCg\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "12a7c261-84e9-4cd4-b794-1b5847e0524d" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: 632D2CBDC9D9448FB3C565859BA4CFE4 Ref B: CO1EDGE0114 Ref C: 2018-10-22T22:32:48Z" ], "X-Powered-By": [ "Express" ], - "x-ms-request-id": [ - "eb36e6bc-0225-43f3-880f-f9e7197150f6" + "x-ms-correlation-request-id": [ + "d367625c-ef1b-414e-8662-1bf8c465a832" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T223248Z:d367625c-ef1b-414e-8662-1bf8c465a832" + ], + "Content-Length": [ + "132" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"Invalid subdomain input: undefined\",\r\n \"message\": \"Value is not of the correct type: expected string.\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHA/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHA/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdkapp\"\r\n }\r\n}", + "RequestBody": "{\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdksubdomain\"\r\n }\r\n}", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "161" - ], "x-ms-client-request-id": [ - "00c1a5b7-cfc6-4f29-9f62-189d48b91fad" + "5dab2e57-7244-4513-8e2b-05ed59a656d1" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"54d65eb0-eea2-4db8-9325-d811e7bcb3b6\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdkapp\",\r\n \"createdDate\": \"2018-06-18T18:22:59.415Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"5e00d793-0000-0000-0000-5b27f8830000\\\"\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "557" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ + "167" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], - "Connection": [ - "keep-alive" - ], "Date": [ - "Mon, 18 Jun 2018 18:22:59 GMT" + "Mon, 22 Oct 2018 22:32:52 GMT" ], "ETag": [ - "\"5e00d793-0000-0000-0000-5b27f8830000\"" + "W/\"6100c4ae-0000-0000-0000-5bce50140000\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "ce868690-1bba-4113-a395-54ee88114e54" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: A9EFF572E1544CFD9C0A61E864BB82DF Ref B: CO1EDGE0114 Ref C: 2018-10-22T22:32:52Z" ], "X-Powered-By": [ "Express" ], - "x-ms-request-id": [ - "b5fabeb4-6509-47ca-9982-fb062d0016eb" + "x-ms-correlation-request-id": [ + "75f88af7-1214-410e-bf14-2655546bbd87" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T223252Z:75f88af7-1214-410e-bf14-2655546bbd87" + ], + "Content-Length": [ + "611" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"db42e434-c1fe-4927-935f-ad41ec334e68\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomain\",\r\n \"createdDate\": \"2018-10-22T22:32:52.594Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"6100c4ae-0000-0000-0000-5bce50140000\\\"\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/dotnetsdkiotcentralrg/providers/Microsoft.IoTCentral/IoTApps?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL2RvdG5ldHNka2lvdGNlbnRyYWxyZy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcz9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/dotnetsdkiotcentralrg/providers/Microsoft.IoTCentral/IoTApps?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL2RvdG5ldHNka2lvdGNlbnRyYWxyZy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcz9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "b000de6e-a032-4406-9446-c6dfa08f4096" + "5f4d1517-01d8-4a06-b0a9-9741ed0aed91" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"54d65eb0-eea2-4db8-9325-d811e7bcb3b6\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdkapp\",\r\n \"createdDate\": \"2018-06-18T18:22:59.415Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"5e00d793-0000-0000-0000-5b27f8830000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "ResponseHeaders": { - "Content-Length": [ - "585" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], - "Connection": [ - "keep-alive" - ], "Date": [ - "Mon, 18 Jun 2018 18:22:59 GMT" + "Mon, 22 Oct 2018 22:32:52 GMT" ], "ETag": [ - "W/\"249-n2TiAGCQI9sBVVLQ2gGSLzWECxY\"" + "W/\"27f-Y7ekoJ42rzfwD6zH0qzGGHz0I9w\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "bc496d24-3df5-48de-a54b-dfc390bded8a" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: 37C0EE0102AE4F649A99EAAF277F5C3E Ref B: CO1EDGE0114 Ref C: 2018-10-22T22:32:53Z" ], "X-Powered-By": [ "Express" ], - "x-ms-request-id": [ - "a162be6e-d61c-4bc6-90b6-b8a7d4a94bfd" + "x-ms-correlation-request-id": [ + "abb45bd1-18b0-4cfe-a499-fac4ddc3c6ec" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T223253Z:abb45bd1-18b0-4cfe-a499-fac4ddc3c6ec" + ], + "Content-Length": [ + "639" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"db42e434-c1fe-4927-935f-ad41ec334e68\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomain\",\r\n \"createdDate\": \"2018-10-22T22:32:52.594Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"6100c4ae-0000-0000-0000-5bce50140000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/providers/Microsoft.IoTCentral/IoTApps?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9Jb1RBcHBzP2FwaS12ZXJzaW9uPTIwMTgtMDktMDE=", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/providers/Microsoft.IoTCentral/IoTApps?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9Jb1RBcHBzP2FwaS12ZXJzaW9uPTIwMTgtMDktMDE=", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "0c8d3f60-fa90-476c-932a-36c009a3178a" + "d3ab1f04-03b8-4845-a31a-8981cbbba8a2" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"54d65eb0-eea2-4db8-9325-d811e7bcb3b6\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"subdomain\": \"dotnetsdkapp\",\r\n \"createdDate\": \"2018-06-18T18:22:59.415Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"5e00d793-0000-0000-0000-5b27f8830000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "ResponseHeaders": { - "Content-Length": [ - "585" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], - "Connection": [ - "keep-alive" - ], "Date": [ - "Mon, 18 Jun 2018 18:22:59 GMT" + "Mon, 22 Oct 2018 22:32:53 GMT" ], "ETag": [ - "W/\"249-n2TiAGCQI9sBVVLQ2gGSLzWECxY\"" + "W/\"754-2X7mgJKAhIArPQkmxRmhZV+oGbY\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "1937a0e7-5a9e-4110-b5f0-e4ac24ab33bc" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: 147DA38A482645CE93DF9EF718E75FA2 Ref B: CO1EDGE0114 Ref C: 2018-10-22T22:32:53Z" ], "X-Powered-By": [ "Express" ], - "x-ms-request-id": [ - "46b26748-b25c-4e63-ab2b-2f69af5c0d02" + "x-ms-correlation-request-id": [ + "130d6846-59fe-477d-b772-7ceab284ceb7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T223253Z:130d6846-59fe-477d-b772-7ceab284ceb7" + ], + "Content-Length": [ + "1876" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/clthomps/providers/Microsoft.IoTCentral/IoTApps/power-shell-application-test-prod\",\r\n \"name\": \"power-shell-application-test-prod\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"Hello\": \"World\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"9ba6e15e-10c2-4bd4-93fb-793d8ec469f8\",\r\n \"state\": \"created\",\r\n \"displayName\": \"AWAITED DISLAY NAME\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"power-shell-app-test-sub-prod\",\r\n \"createdDate\": \"2018-10-08T22:53:37.098Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"1d004da1-0000-0000-0000-5bbbdff10000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourcegroups/binren/providers/Microsoft.IoTCentral/IoTApps/1019-app-on-prod-eastus\",\r\n \"name\": \"1019-app-on-prod-eastus\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"applicationId\": \"4a26b0e6-d70b-4bc2-9aa1-60a3feb96879\",\r\n \"state\": \"created\",\r\n \"displayName\": \"1019-app-on-prod-eastus\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"1019-app-on-prod-eastus\",\r\n \"createdDate\": \"2018-10-20T00:57:03.121Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"1400fb08-0000-0000-0000-5bca7d5f0000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapp\",\r\n \"name\": \"dotnetsdkapp\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"db42e434-c1fe-4927-935f-ad41ec334e68\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapp\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomain\",\r\n \"createdDate\": \"2018-10-22T22:32:52.594Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"6100c4ae-0000-0000-0000-5bce50140000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "StatusCode": 200 }, { @@ -322,48 +576,72 @@ "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "723b0f2d-f254-4420-9002-4d240b9d9e0e" + "6ede1e05-8b5e-477f-87a7-a6b1950fbd08" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.IoTCentral/IoTApps/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"IoTApps\",\r\n \"operation\": \"Get IoT Central Application\",\r\n \"description\": \"Gets a single IoT Central Application\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/IoTApps/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"IoTApps\",\r\n \"operation\": \"Create or Update IoT Central Application\",\r\n \"description\": \"Creates or Updates an IoT Central Applications\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/IoTApps/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"IoTApps\",\r\n \"operation\": \"Delete IoT Central Application\",\r\n \"description\": \"Deletes an IoT Central Applications\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/checkNameAvailability/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"\",\r\n \"operation\": \"Check resource name availability\",\r\n \"description\": \"Checks if an IoT Central Application name is available\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/operations/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"\",\r\n \"operation\": \"Get all the available operations\",\r\n \"description\": \"Gets all the available operations on IoT Central Applications\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "ResponseHeaders": { - "Content-Length": [ - "1154" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], - "Connection": [ - "keep-alive" - ], "Date": [ - "Mon, 18 Jun 2018 18:22:59 GMT" + "Mon, 22 Oct 2018 22:32:53 GMT" ], "ETag": [ - "W/\"482-Hie4o+9pAAwaSj8NEr5AKLD79Sg\"" + "W/\"581-rmnj4uJEbi29tZIZqoBydiucgCE\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-tenant-reads": [ + "11999" + ], + "x-ms-request-id": [ + "9672b2b4-be78-45e7-9db2-fecc2835af45" + ], + "X-IoT-Version": [ + "20181021.2" + ], + "X-IoT-Cluster": [ + "iotcprodwestus01" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-MSEdge-Ref": [ + "Ref A: 3915C75D09F1426086C583AC4FB14138 Ref B: CO1EDGE0114 Ref C: 2018-10-22T22:32:54Z" ], "X-Powered-By": [ "Express" ], - "x-ms-request-id": [ - "e0c61130-58cb-4e5c-b13a-7e3aaf92aa22" + "x-ms-correlation-request-id": [ + "6b07eeb3-1314-450c-9ede-c7ddfe9bfffd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181022T223254Z:6b07eeb3-1314-450c-9ede-c7ddfe9bfffd" + ], + "Content-Length": [ + "1409" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"Microsoft.IoTCentral/IoTApps/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"IoTApps\",\r\n \"operation\": \"Get IoT Central Application\",\r\n \"description\": \"Gets a single IoT Central Application\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/IoTApps/write\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"IoTApps\",\r\n \"operation\": \"Create or Update IoT Central Application\",\r\n \"description\": \"Creates or Updates an IoT Central Applications\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/IoTApps/delete\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"IoTApps\",\r\n \"operation\": \"Delete IoT Central Application\",\r\n \"description\": \"Deletes an IoT Central Applications\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/checkNameAvailability/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"\",\r\n \"operation\": \"Check resource name availability\",\r\n \"description\": \"Checks if an IoT Central Application name is available\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/checkSubdomainAvailability/action\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"\",\r\n \"operation\": \"Check resource subdomain availability\",\r\n \"description\": \"Checks if an IoT Central Application subdomain is available\"\r\n }\r\n },\r\n {\r\n \"name\": \"Microsoft.IoTCentral/operations/read\",\r\n \"display\": {\r\n \"provider\": \"Microsoft IoT Central\",\r\n \"resource\": \"\",\r\n \"operation\": \"Get all the available operations\",\r\n \"description\": \"Gets all the available operations on IoT Central Applications\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "5e057e7d-4134-4581-aeaf-a40b25e60055" + "SubscriptionId": "c75f6a44-0c50-4e42-b7ec-9ff5590b0944" } } \ No newline at end of file diff --git a/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralUpdateLifeCycle.json b/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralUpdateLifeCycle.json index 96a27c7fbf34c..1d7d165b1aa5a 100644 --- a/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralUpdateLifeCycle.json +++ b/src/SDKs/IotCentral/IotCentral.Tests/SessionRecords/IotCentral.Tests.ScenarioTests.IotCentralLifeCycleTests/TestIotCentralUpdateLifeCycle.json @@ -1,44 +1,34 @@ { "Entries": [ { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourcegroups/UpdateDotNetSdkIotCentralRG?api-version=2017-05-10", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlZ3JvdXBzL1VwZGF0ZURvdE5ldFNka0lvdENlbnRyYWxSRz9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourcegroups/DotNetSdkIotCentralRGUpdate?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlZ3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSR1VwZGF0ZT9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", "RequestMethod": "PUT", "RequestBody": "{\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "28" - ], "x-ms-client-request-id": [ - "7c2f84e5-4025-4e09-a029-e0850c17aad1" + "435d5602-6ee0-4136-b24b-a9287aba97ea" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", + "FxVersion/4.6.26614.01", "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG\",\r\n \"name\": \"UpdateDotNetSdkIotCentralRG\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "207" ], "Content-Type": [ "application/json; charset=utf-8" ], - "Expires": [ - "-1" - ], + "Content-Length": [ + "28" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-cache" ], "Date": [ - "Mon, 18 Jun 2018 23:25:05 GMT" + "Mon, 22 Oct 2018 22:33:23 GMT" ], "Pragma": [ "no-cache" @@ -47,75 +37,71 @@ "1199" ], "x-ms-request-id": [ - "2e3e2f46-5448-47db-9263-43624ae01212" + "d0e1f89f-c216-44f4-b8fe-025d6d8a298e" ], "x-ms-correlation-request-id": [ - "2e3e2f46-5448-47db-9263-43624ae01212" + "d0e1f89f-c216-44f4-b8fe-025d6d8a298e" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232505Z:2e3e2f46-5448-47db-9263-43624ae01212" + "WESTUS2:20181022T223323Z:d0e1f89f-c216-44f4-b8fe-025d6d8a298e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" + ], + "Content-Length": [ + "207" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" ] }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate\",\r\n \"name\": \"DotNetSdkIotCentralRGUpdate\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", "StatusCode": 201 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/providers/Microsoft.IoTCentral/checkNameAvailability?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"name\": \"dotnetsdkapppdate\"\r\n}", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSR1VwZGF0ZS9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHB1cGRhdGU/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"dotnetsdkappupdate\",\r\n \"subdomain\": \"dotnetsdksubdomainupdate\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"location\": \"WestUS\"\r\n}", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "35" - ], "x-ms-client-request-id": [ - "537f9096-8d5f-4489-98d7-a4fe8f1eccec" + "22777e4d-ff12-41ca-99ae-fc8919596e05" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"nameAvailable\": true\r\n}", - "ResponseHeaders": { + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" + ], "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ + "176" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], "Date": [ - "Mon, 18 Jun 2018 23:25:05 GMT" - ], - "Transfer-Encoding": [ - "chunked" + "Mon, 22 Oct 2018 22:35:02 GMT" ], "ETag": [ - "W/\"16-4/x+wI91pK3bZiWtoOg+Zr/n2HE\"" - ], - "Vary": [ - "Accept-Encoding", - "Accept-Encoding" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" + "\"01009384-0000-0000-0000-5bce50960000\"" ], "x-ms-request-id": [ - "bbab3035-a57c-4cb4-a4dc-198362e77f66" + "51733e93-bde3-41f7-b155-0bca3c8f1f9b" ], "X-IoT-Version": [ - "20180611.4" + "20181021.2" ], "X-IoT-Cluster": [ "iotcprodwestus01" @@ -127,68 +113,65 @@ "max-age=31536000; includeSubDomains" ], "X-MSEdge-Ref": [ - "Ref A: 6221002404E84AA1A4502CE1F84C0CA7 Ref B: CO1EDGE0212 Ref C: 2018-06-18T23:25:06Z" + "Ref A: DF15B44E07194AB687979F6740A3F64B Ref B: CO1EDGE0212 Ref C: 2018-10-22T22:35:02Z" ], "X-Powered-By": [ "Express" ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], "x-ms-correlation-request-id": [ - "9bb134a8-89ae-4b43-abad-864da4e5fb25" + "9d89f055-36c1-446b-b927-3a58666b7a19" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232506Z:9bb134a8-89ae-4b43-abad-864da4e5fb25" + "WESTUS2:20181022T223502Z:9d89f055-36c1-446b-b927-3a58666b7a19" + ], + "Content-Length": [ + "600" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, - "StatusCode": 200 + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate\",\r\n \"name\": \"dotnetsdkappupdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"applicationId\": \"24a26410-73cc-43af-972c-8213d35410e4\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkappupdate\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomainupdate\",\r\n \"createdDate\": \"2018-10-22T22:35:02.395Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"01009384-0000-0000-0000-5bce50960000\\\"\"\r\n}", + "StatusCode": 201 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHBwZGF0ZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"dotnetsdkapppdate\",\r\n \"subdomain\": \"dotnetsdkapppdate\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"location\": \"WestUS\"\r\n}", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSR1VwZGF0ZS9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHB1cGRhdGU/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "168" - ], - "x-ms-client-request-id": [ - "ee02074c-c316-49b2-988c-6efe383dd3b7" - ], - "accept-language": [ - "en-US" - ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate\",\r\n \"name\": \"dotnetsdkapppdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"applicationId\": \"5093ca00-4f07-46e8-9b20-90a59ddecbab\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapppdate\",\r\n \"subdomain\": \"dotnetsdkapppdate\",\r\n \"createdDate\": \"2018-06-18T23:25:08.736Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"2b005146-0000-0000-0000-5b283f540000\\\"\"\r\n}", "ResponseHeaders": { - "Content-Length": [ - "542" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], "Date": [ - "Mon, 18 Jun 2018 23:25:08 GMT" + "Mon, 22 Oct 2018 22:35:33 GMT" ], "ETag": [ - "\"2b005146-0000-0000-0000-5b283f540000\"" + "W/\"01009384-0000-0000-0000-5bce50960000\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" ], "x-ms-request-id": [ - "4a82e20a-ff63-4d61-a9ab-ff78e636e0ab" + "8d135760-a0eb-43ee-9b2d-f2b546516d0e" ], "X-IoT-Version": [ - "20180611.4" + "20181021.2" ], "X-IoT-Cluster": [ - "iotcprodwestus01" + "iotcprodwestus02" ], "X-Content-Type-Options": [ "nosniff" @@ -197,68 +180,71 @@ "max-age=31536000; includeSubDomains" ], "X-MSEdge-Ref": [ - "Ref A: DAC0B32AC8C641F68248C5DE777DAFB6 Ref B: CO1EDGE0212 Ref C: 2018-06-18T23:25:08Z" + "Ref A: E8C08FDE58024C17B65D1D6387FB79BA Ref B: CO1EDGE0212 Ref C: 2018-10-22T22:35:33Z" ], "X-Powered-By": [ "Express" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], "x-ms-correlation-request-id": [ - "e2033548-1974-403a-9361-b2a5e7112bdd" + "cc94ebd7-2493-4596-870c-28b916894eec" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232508Z:e2033548-1974-403a-9361-b2a5e7112bdd" + "WESTUS2:20181022T223533Z:cc94ebd7-2493-4596-870c-28b916894eec" + ], + "Content-Length": [ + "600" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, - "StatusCode": 201 + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate\",\r\n \"name\": \"dotnetsdkappupdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"applicationId\": \"24a26410-73cc-43af-972c-8213d35410e4\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkappupdate\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomainupdate\",\r\n \"createdDate\": \"2018-10-22T22:35:02.395Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"01009384-0000-0000-0000-5bce50960000\\\"\"\r\n}", + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHBwZGF0ZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"test-updated-display-name\",\r\n \"subdomain\": \"test-updated-sub-domain\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"location\": \"WestUS\"\r\n}", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/providers/Microsoft.IoTCentral/checkNameAvailability?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9jaGVja05hbWVBdmFpbGFiaWxpdHk/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"dotnetsdkappupdate\",\r\n \"type\": \"IoTApps\"\r\n}", "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "221" - ], "x-ms-client-request-id": [ - "c2d5e47a-9b94-4e26-b790-dff4b57d1f5b" + "2cf84afd-3958-44c6-8427-37cb8fec3385" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate\",\r\n \"name\": \"dotnetsdkapppdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"applicationId\": \"b2b3496c-4cd0-4c35-bba9-cf67a29e6bd0\",\r\n \"state\": \"created\",\r\n \"displayName\": \"test-updated-display-name\",\r\n \"subdomain\": \"test-updated-sub-domain\",\r\n \"createdDate\": \"2018-06-18T23:25:41.697Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"0b00a389-0000-0000-0000-5b283f750000\\\"\"\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "556" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ], "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ + "58" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], "Date": [ - "Mon, 18 Jun 2018 23:25:40 GMT" + "Mon, 22 Oct 2018 22:37:30 GMT" ], "ETag": [ - "\"0b00a389-0000-0000-0000-5b283f750000\"" + "W/\"6b-Obxvouplxe0P3Of7PGeaPXdqcas\"" + ], + "Vary": [ + "Accept-Encoding" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" ], "x-ms-request-id": [ - "f6b87946-1afc-4891-b48b-74a36170091c" + "3b5dd551-cb64-4f03-afd7-7cd0bc47a7c2" ], "X-IoT-Version": [ - "20180611.4" + "20181021.2" ], "X-IoT-Cluster": [ "iotcprodwestus01" @@ -270,63 +256,71 @@ "max-age=31536000; includeSubDomains" ], "X-MSEdge-Ref": [ - "Ref A: 3EB7A053743A433BACF5D93561145691 Ref B: CO1EDGE0212 Ref C: 2018-06-18T23:25:41Z" + "Ref A: D372F746B5B54E019AA62CFF890B8299 Ref B: CO1EDGE0413 Ref C: 2018-10-22T22:37:30Z" ], "X-Powered-By": [ "Express" ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], "x-ms-correlation-request-id": [ - "e8fb3b54-e235-4d9c-afea-b404beee76ff" + "835dcb3a-c683-4690-984e-a442f1bd6457" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232541Z:e8fb3b54-e235-4d9c-afea-b404beee76ff" + "WESTUS2:20181022T223730Z:835dcb3a-c683-4690-984e-a442f1bd6457" + ], + "Content-Length": [ + "107" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, - "StatusCode": 201 + "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"The resource name is in use\",\r\n \"message\": \"Try other variations of the name\"\r\n}", + "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHBwZGF0ZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/providers/Microsoft.IoTCentral/checkSubdomainAvailability?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9jaGVja1N1YmRvbWFpbkF2YWlsYWJpbGl0eT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", + "RequestMethod": "POST", + "RequestBody": "{\r\n \"name\": \"dotnetsdksubdomainupdate\",\r\n \"type\": \"IoTApps\"\r\n}", "RequestHeaders": { + "x-ms-client-request-id": [ + "50d02815-3f69-416a-9b6b-e95f534b5b92" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate\",\r\n \"name\": \"dotnetsdkapppdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"applicationId\": \"5093ca00-4f07-46e8-9b20-90a59ddecbab\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapppdate\",\r\n \"subdomain\": \"dotnetsdkapppdate\",\r\n \"createdDate\": \"2018-06-18T23:25:08.736Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"2b005146-0000-0000-0000-5b283f540000\\\"\"\r\n}", - "ResponseHeaders": { + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" + ], "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ + "64" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], "Date": [ - "Mon, 18 Jun 2018 23:25:38 GMT" - ], - "Transfer-Encoding": [ - "chunked" + "Mon, 22 Oct 2018 22:37:30 GMT" ], "ETag": [ - "W/\"2b005146-0000-0000-0000-5b283f540000\"" + "W/\"84-kje7/MXajOLBoqSHYaXMsyUojCg\"" ], "Vary": [ - "Accept-Encoding", "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14999" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" ], "x-ms-request-id": [ - "3dcd8055-441a-44ca-86ea-dd7b66dccc83" + "592b2cad-809b-4e47-a896-7b46ec1f017b" ], "X-IoT-Version": [ - "20180611.4" + "20181021.2" ], "X-IoT-Cluster": [ "iotcprodwestus01" @@ -338,60 +332,71 @@ "max-age=31536000; includeSubDomains" ], "X-MSEdge-Ref": [ - "Ref A: F0CF48028D764D028C7C0F488E8273B0 Ref B: CO1EDGE0212 Ref C: 2018-06-18T23:25:39Z" + "Ref A: 5B39C768061344289BCD3D804CFECF91 Ref B: CO1EDGE0413 Ref C: 2018-10-22T22:37:30Z" ], "X-Powered-By": [ "Express" ], "x-ms-correlation-request-id": [ - "48fcc8a8-579a-4800-8229-f1778a557d21" + "cc3b511b-1344-457d-a76a-59522abee8c4" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232539Z:48fcc8a8-579a-4800-8229-f1778a557d21" + "WESTUS2:20181022T223730Z:cc3b511b-1344-457d-a76a-59522abee8c4" + ], + "Content-Length": [ + "132" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"nameAvailable\": false,\r\n \"reason\": \"Invalid subdomain input: undefined\",\r\n \"message\": \"Value is not of the correct type: expected string.\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHBwZGF0ZT9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", - "RequestMethod": "GET", - "RequestBody": "", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSR1VwZGF0ZS9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcy9kb3RuZXRzZGthcHB1cGRhdGU/YXBpLXZlcnNpb249MjAxOC0wOS0wMQ==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"displayName\": \"test-updated-display-name\",\r\n \"subdomain\": \"test-updated-sub-domain\"\r\n }\r\n}", "RequestHeaders": { + "x-ms-client-request-id": [ + "1dfada87-f34a-4f5f-989a-7f127e4e86f6" + ], + "accept-language": [ + "en-US" + ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate\",\r\n \"name\": \"dotnetsdkapppdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"applicationId\": \"b2b3496c-4cd0-4c35-bba9-cf67a29e6bd0\",\r\n \"state\": \"created\",\r\n \"displayName\": \"test-updated-display-name\",\r\n \"subdomain\": \"test-updated-sub-domain\",\r\n \"createdDate\": \"2018-06-18T23:25:41.697Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"0b00a389-0000-0000-0000-5b283f750000\\\"\"\r\n}", - "ResponseHeaders": { + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" + ], "Content-Type": [ "application/json; charset=utf-8" ], + "Content-Length": [ + "185" + ] + }, + "ResponseHeaders": { "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], "Date": [ - "Mon, 18 Jun 2018 23:26:11 GMT" - ], - "Transfer-Encoding": [ - "chunked" + "Mon, 22 Oct 2018 22:37:31 GMT" ], "ETag": [ - "W/\"0b00a389-0000-0000-0000-5b283f750000\"" + "W/\"0100cf84-0000-0000-0000-5bce512b0000\"" ], "Vary": [ - "Accept-Encoding", "Accept-Encoding" ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14998" + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" ], "x-ms-request-id": [ - "527d6ce2-094d-443e-85cb-3eb91e7d775b" + "6eee817f-855e-4636-9295-827b964e23dc" ], "X-IoT-Version": [ - "20180611.4" + "20181021.2" ], "X-IoT-Cluster": [ "iotcprodwestus01" @@ -403,66 +408,65 @@ "max-age=31536000; includeSubDomains" ], "X-MSEdge-Ref": [ - "Ref A: FC745C365C8341D1B327EEC493F4EB9F Ref B: CO1EDGE0212 Ref C: 2018-06-18T23:26:12Z" + "Ref A: 521D3F78064A4B87937209E403ECAB9A Ref B: CO1EDGE0413 Ref C: 2018-10-22T22:37:31Z" ], "X-Powered-By": [ "Express" ], "x-ms-correlation-request-id": [ - "1ed3f6ed-7327-4576-bfc5-3e605bd2e63f" + "75a2ac4e-47dd-49ff-80d5-1cc49000759b" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232612Z:1ed3f6ed-7327-4576-bfc5-3e605bd2e63f" + "WESTUS2:20181022T223731Z:75a2ac4e-47dd-49ff-80d5-1cc49000759b" + ], + "Content-Length": [ + "648" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate\",\r\n \"name\": \"dotnetsdkappupdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"24a26410-73cc-43af-972c-8213d35410e4\",\r\n \"state\": \"created\",\r\n \"displayName\": \"test-updated-display-name\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomainupdate\",\r\n \"createdDate\": \"2018-10-22T22:37:31.669Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"0100cf84-0000-0000-0000-5bce512b0000\\\"\"\r\n}", "StatusCode": 200 }, { - "RequestUri": "/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps?api-version=2018-09-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNWUwNTdlN2QtNDEzNC00NTgxLWFlYWYtYTQwYjI1ZTYwMDU1L3Jlc291cmNlR3JvdXBzL1VwZGF0ZURvdE5ldFNka0lvdENlbnRyYWxSRy9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcz9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", + "RequestUri": "/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps?api-version=2018-09-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYzc1ZjZhNDQtMGM1MC00ZTQyLWI3ZWMtOWZmNTU5MGIwOTQ0L3Jlc291cmNlR3JvdXBzL0RvdE5ldFNka0lvdENlbnRyYWxSR1VwZGF0ZS9wcm92aWRlcnMvTWljcm9zb2Z0LklvVENlbnRyYWwvSW9UQXBwcz9hcGktdmVyc2lvbj0yMDE4LTA5LTAx", "RequestMethod": "GET", "RequestBody": "", "RequestHeaders": { "x-ms-client-request-id": [ - "c1260cad-57de-43bd-9b63-5c62af4ae70f" + "5e8e152a-94b2-4739-8073-a816943dea75" ], "accept-language": [ "en-US" ], "User-Agent": [ - "FxVersion/4.6.26328.01", - "Microsoft.Azure.Management.IotCentral.IotCentralClient/0.0.0.0" + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.IotCentral.IotCentralClient/2.0.0.0" ] }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate\",\r\n \"name\": \"dotnetsdkapppdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"applicationId\": \"b2b3496c-4cd0-4c35-bba9-cf67a29e6bd0\",\r\n \"state\": \"created\",\r\n \"displayName\": \"test-updated-display-name\",\r\n \"subdomain\": \"test-updated-sub-domain\",\r\n \"createdDate\": \"2018-06-18T23:25:41.697Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"0b00a389-0000-0000-0000-5b283f750000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/5e057e7d-4134-4581-aeaf-a40b25e60055/resourceGroups/UpdateDotNetSdkIotCentralRG/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkapppdate\",\r\n \"name\": \"dotnetsdkapppdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"WestUS\",\r\n \"properties\": {\r\n \"applicationId\": \"5093ca00-4f07-46e8-9b20-90a59ddecbab\",\r\n \"state\": \"created\",\r\n \"displayName\": \"dotnetsdkapppdate\",\r\n \"subdomain\": \"dotnetsdkapppdate\",\r\n \"createdDate\": \"2018-06-18T23:25:08.736Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"2b005146-0000-0000-0000-5b283f540000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "ResponseHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], "Cache-Control": [ "no-store, must-revalidate, no-cache, max-stale=0, private, post-check=0, pre-check=0" ], "Date": [ - "Mon, 18 Jun 2018 23:26:12 GMT" - ], - "Transfer-Encoding": [ - "chunked" + "Mon, 22 Oct 2018 22:37:32 GMT" ], "ETag": [ - "W/\"467-qHczbuKzWt1zFByZko+PqPdabZE\"" + "W/\"2a4-nc04Y8MzNmBBuRpTLXklJECU+2o\"" ], "Vary": [ - "Accept-Encoding", "Accept-Encoding" ], "x-ms-ratelimit-remaining-subscription-reads": [ - "14997" + "11999" ], "x-ms-request-id": [ - "eadd3494-d8e8-493c-ba3e-d8b0343600db" + "18767b2a-0f24-4739-bffb-89cec3f0075b" ], "X-IoT-Version": [ - "20180611.4" + "20181021.2" ], "X-IoT-Cluster": [ "iotcprodwestus01" @@ -474,23 +478,30 @@ "max-age=31536000; includeSubDomains" ], "X-MSEdge-Ref": [ - "Ref A: B25D270D154F4229B50F3337542B2E93 Ref B: CO1EDGE0120 Ref C: 2018-06-18T23:26:12Z" + "Ref A: E4819070C829421A9FA9AA2881D65712 Ref B: CO1EDGE0413 Ref C: 2018-10-22T22:37:32Z" ], "X-Powered-By": [ "Express" ], "x-ms-correlation-request-id": [ - "537c051c-7b51-4e56-9084-52a636fabde3" + "a4f0aa22-122b-4c54-b570-e9445efa0efa" ], "x-ms-routing-request-id": [ - "WESTUS2:20180618T232612Z:537c051c-7b51-4e56-9084-52a636fabde3" + "WESTUS2:20181022T223732Z:a4f0aa22-122b-4c54-b570-e9445efa0efa" + ], + "Content-Length": [ + "676" + ], + "Content-Type": [ + "application/json; charset=utf-8" ] }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/c75f6a44-0c50-4e42-b7ec-9ff5590b0944/resourceGroups/DotNetSdkIotCentralRGUpdate/providers/Microsoft.IoTCentral/IoTApps/dotnetsdkappupdate\",\r\n \"name\": \"dotnetsdkappupdate\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"24a26410-73cc-43af-972c-8213d35410e4\",\r\n \"state\": \"created\",\r\n \"displayName\": \"test-updated-display-name\",\r\n \"tenant\": \"72f988bf-86f1-41af-91ab-2d7cd011db47\",\r\n \"subdomain\": \"dotnetsdksubdomainupdate\",\r\n \"createdDate\": \"2018-10-22T22:37:31.669Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"0100cf84-0000-0000-0000-5bce512b0000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", "StatusCode": 200 } ], "Names": {}, "Variables": { - "SubscriptionId": "5e057e7d-4134-4581-aeaf-a40b25e60055" + "SubscriptionId": "c75f6a44-0c50-4e42-b7ec-9ff5590b0944" } } \ No newline at end of file diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperations.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperations.cs index b2d2d0a5e76d4..90f6584f8f1c1 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperations.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperations.cs @@ -674,8 +674,9 @@ internal AppsOperations(IotCentralClient client) /// /// Check if an IoT Central application name is available. /// - /// - /// The name of the IoT Central application instance to check. + /// + /// Set the name parameter in the OperationInputs structure to the name of the + /// IoT Central application to check. /// /// /// Headers that will be added to request. @@ -698,7 +699,7 @@ internal AppsOperations(IotCentralClient client) /// /// A response object containing the response body and response headers. /// - public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> CheckNameAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.ApiVersion == null) { @@ -708,14 +709,13 @@ internal AppsOperations(IotCentralClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - if (name == null) + if (operationInputs == null) { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); + throw new ValidationException(ValidationRules.CannotBeNull, "operationInputs"); } - OperationInputs operationInputs = new OperationInputs(); - if (name != null) + if (operationInputs != null) { - operationInputs.Name = name; + operationInputs.Validate(); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -831,7 +831,7 @@ internal AppsOperations(IotCentralClient client) throw ex; } // Create Result - var _result = new AzureOperationResponse(); + var _result = new AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; if (_httpResponse.Headers.Contains("x-ms-request-id")) @@ -844,7 +844,199 @@ internal AppsOperations(IotCentralClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Check if an IoT Central application subdomain is available. + /// + /// + /// Set the name parameter in the OperationInputs structure to the subdomain of + /// the IoT Central application to check. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CheckSubdomainAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (operationInputs == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "operationInputs"); + } + if (operationInputs != null) + { + operationInputs.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("operationInputs", operationInputs); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CheckSubdomainAvailability", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(operationInputs != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(operationInputs, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); } catch (JsonException ex) { diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperationsExtensions.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperationsExtensions.cs index b87a4d9ffaa7a..f43be14a0d464 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperationsExtensions.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/AppsOperationsExtensions.cs @@ -264,12 +264,13 @@ public static IPage ListByResourceGroup(this IAppsOperations operations, st /// /// The operations group for this extension method. /// - /// - /// The name of the IoT Central application instance to check. + /// + /// Set the name parameter in the OperationInputs structure to the name of the + /// IoT Central application to check. /// - public static AppNameAvailabilityInfo CheckNameAvailability(this IAppsOperations operations, string name) + public static AppAvailabilityInfo CheckNameAvailability(this IAppsOperations operations, OperationInputs operationInputs) { - return operations.CheckNameAvailabilityAsync(name).GetAwaiter().GetResult(); + return operations.CheckNameAvailabilityAsync(operationInputs).GetAwaiter().GetResult(); } /// @@ -278,15 +279,52 @@ public static AppNameAvailabilityInfo CheckNameAvailability(this IAppsOperations /// /// The operations group for this extension method. /// - /// - /// The name of the IoT Central application instance to check. + /// + /// Set the name parameter in the OperationInputs structure to the name of the + /// IoT Central application to check. /// /// /// The cancellation token. /// - public static async Task CheckNameAvailabilityAsync(this IAppsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task CheckNameAvailabilityAsync(this IAppsOperations operations, OperationInputs operationInputs, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(operationInputs, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Check if an IoT Central application subdomain is available. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Set the name parameter in the OperationInputs structure to the subdomain of + /// the IoT Central application to check. + /// + public static AppAvailabilityInfo CheckSubdomainAvailability(this IAppsOperations operations, OperationInputs operationInputs) + { + return operations.CheckSubdomainAvailabilityAsync(operationInputs).GetAwaiter().GetResult(); + } + + /// + /// Check if an IoT Central application subdomain is available. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Set the name parameter in the OperationInputs structure to the subdomain of + /// the IoT Central application to check. + /// + /// + /// The cancellation token. + /// + public static async Task CheckSubdomainAvailabilityAsync(this IAppsOperations operations, OperationInputs operationInputs, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CheckSubdomainAvailabilityWithHttpMessagesAsync(operationInputs, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/IAppsOperations.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/IAppsOperations.cs index 5ca754b70d8ec..29106373f119e 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/IAppsOperations.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/IAppsOperations.cs @@ -179,8 +179,9 @@ public partial interface IAppsOperations /// /// Check if an IoT Central application name is available. /// - /// - /// The name of the IoT Central application instance to check. + /// + /// Set the name parameter in the OperationInputs structure to the name + /// of the IoT Central application to check. /// /// /// The headers that will be added to request. @@ -197,7 +198,30 @@ public partial interface IAppsOperations /// /// Thrown when a required parameter is null /// - Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> CheckNameAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Check if an IoT Central application subdomain is available. + /// + /// + /// Set the name parameter in the OperationInputs structure to the + /// subdomain of the IoT Central application to check. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CheckSubdomainAvailabilityWithHttpMessagesAsync(OperationInputs operationInputs, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Create or update the metadata of an IoT Central application. The /// usual pattern to modify a property is to retrieve the IoT Central diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameAvailabilityInfo.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppAvailabilityInfo.cs similarity index 65% rename from src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameAvailabilityInfo.cs rename to src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppAvailabilityInfo.cs index 2a5b6f3624a87..92ed9e7b4da09 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameAvailabilityInfo.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppAvailabilityInfo.cs @@ -15,27 +15,26 @@ namespace Microsoft.Azure.Management.IotCentral.Models /// /// The properties indicating whether a given IoT Central application name - /// is available. + /// or subdomain is available. /// - public partial class AppNameAvailabilityInfo + public partial class AppAvailabilityInfo { /// - /// Initializes a new instance of the AppNameAvailabilityInfo class. + /// Initializes a new instance of the AppAvailabilityInfo class. /// - public AppNameAvailabilityInfo() + public AppAvailabilityInfo() { CustomInit(); } /// - /// Initializes a new instance of the AppNameAvailabilityInfo class. + /// Initializes a new instance of the AppAvailabilityInfo class. /// /// The value which indicates whether the /// provided name is available. - /// The reason for unavailability. Possible values - /// include: 'Invalid', 'AlreadyExists' + /// The reason for unavailability. /// The detailed reason message. - public AppNameAvailabilityInfo(bool? nameAvailable = default(bool?), AppNameUnavailabilityReason? reason = default(AppNameUnavailabilityReason?), string message = default(string)) + public AppAvailabilityInfo(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string)) { NameAvailable = nameAvailable; Reason = reason; @@ -56,17 +55,16 @@ public AppNameAvailabilityInfo() public bool? NameAvailable { get; private set; } /// - /// Gets the reason for unavailability. Possible values include: - /// 'Invalid', 'AlreadyExists' + /// Gets the reason for unavailability. /// [JsonProperty(PropertyName = "reason")] - public AppNameUnavailabilityReason? Reason { get; private set; } + public string Reason { get; private set; } /// - /// Gets or sets the detailed reason message. + /// Gets the detailed reason message. /// [JsonProperty(PropertyName = "message")] - public string Message { get; set; } + public string Message { get; private set; } } } diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameUnavailabilityReason.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameUnavailabilityReason.cs deleted file mode 100644 index 6fdf275b5d665..0000000000000 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/AppNameUnavailabilityReason.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.IotCentral.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AppNameUnavailabilityReason. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AppNameUnavailabilityReason - { - [EnumMember(Value = "Invalid")] - Invalid, - [EnumMember(Value = "AlreadyExists")] - AlreadyExists - } - internal static class AppNameUnavailabilityReasonEnumExtension - { - internal static string ToSerializedValue(this AppNameUnavailabilityReason? value) - { - return value == null ? null : ((AppNameUnavailabilityReason)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AppNameUnavailabilityReason value) - { - switch( value ) - { - case AppNameUnavailabilityReason.Invalid: - return "Invalid"; - case AppNameUnavailabilityReason.AlreadyExists: - return "AlreadyExists"; - } - return null; - } - - internal static AppNameUnavailabilityReason? ParseAppNameUnavailabilityReason(this string value) - { - switch( value ) - { - case "Invalid": - return AppNameUnavailabilityReason.Invalid; - case "AlreadyExists": - return AppNameUnavailabilityReason.AlreadyExists; - } - return null; - } - } -} diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorDetails.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorDetails.cs index a0d7931b45280..8c7527fe80986 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorDetails.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorDetails.cs @@ -10,12 +10,17 @@ namespace Microsoft.Azure.Management.IotCentral.Models { + using Microsoft.Rest; + using Microsoft.Rest.Serialization; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// /// Error details. /// + [Rest.Serialization.JsonTransformation] public partial class ErrorDetails { /// @@ -32,11 +37,14 @@ public ErrorDetails() /// The error code. /// The error message. /// The target of the particular error. - public ErrorDetails(string code = default(string), string message = default(string), string target = default(string)) + /// A list of additional details about the + /// error. + public ErrorDetails(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) { Code = code; Message = message; Target = target; + Details = details; CustomInit(); } @@ -48,20 +56,26 @@ public ErrorDetails() /// /// Gets the error code. /// - [JsonProperty(PropertyName = "code")] + [JsonProperty(PropertyName = "error.code")] public string Code { get; private set; } /// /// Gets the error message. /// - [JsonProperty(PropertyName = "message")] + [JsonProperty(PropertyName = "error.message")] public string Message { get; private set; } /// /// Gets the target of the particular error. /// - [JsonProperty(PropertyName = "target")] + [JsonProperty(PropertyName = "error.target")] public string Target { get; private set; } + /// + /// Gets or sets a list of additional details about the error. + /// + [JsonProperty(PropertyName = "error.details")] + public IList Details { get; set; } + } } diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorResponseBody.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorResponseBody.cs new file mode 100644 index 0000000000000..9aa1e14dab0bd --- /dev/null +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/ErrorResponseBody.cs @@ -0,0 +1,78 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.IotCentral.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Details of error response. + /// + public partial class ErrorResponseBody + { + /// + /// Initializes a new instance of the ErrorResponseBody class. + /// + public ErrorResponseBody() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ErrorResponseBody class. + /// + /// The error code. + /// The error message. + /// The target of the particular error. + /// A list of additional details about the + /// error. + public ErrorResponseBody(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList)) + { + Code = code; + Message = message; + Target = target; + Details = details; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the error code. + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; private set; } + + /// + /// Gets the error message. + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; private set; } + + /// + /// Gets the target of the particular error. + /// + [JsonProperty(PropertyName = "target")] + public string Target { get; private set; } + + /// + /// Gets or sets a list of additional details about the error. + /// + [JsonProperty(PropertyName = "details")] + public IList Details { get; set; } + + } +} diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/OperationInputs.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/OperationInputs.cs index 541cc9c074888..f2114661cd089 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/OperationInputs.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/Models/OperationInputs.cs @@ -32,9 +32,12 @@ public OperationInputs() /// /// The name of the IoT Central application instance /// to check. - public OperationInputs(string name) + /// The type of the IoT Central resource to + /// query. + public OperationInputs(string name, string type = default(string)) { Name = name; + Type = type; CustomInit(); } @@ -50,6 +53,12 @@ public OperationInputs(string name) [JsonProperty(PropertyName = "name")] public string Name { get; set; } + /// + /// Gets or sets the type of the IoT Central resource to query. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + /// /// Validate the object. /// @@ -62,6 +71,13 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Name"); } + if (Name != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(Name, "^[a-z0-9-]{1,63}$")) + { + throw new ValidationException(ValidationRules.Pattern, "Name", "^[a-z0-9-]{1,63}$"); + } + } } } } diff --git a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/SdkInfo_IotCentralClient.cs b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/SdkInfo_IotCentralClient.cs index 93a05f67db958..0c90832a0143f 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/SdkInfo_IotCentralClient.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/IotCentral/Management.IotCentral/Generated/SdkInfo_IotCentralClient.cs @@ -24,5 +24,16 @@ public static IEnumerable> ApiInfo_IotCentralClien }.AsEnumerable(); } } + // BEGIN: Code Generation Metadata Section + public static readonly String AutoRestVersion = "latest"; + public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/iotcentral/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\Users\\rodelga\\Documents\\Repos\\azure-sdk-for-net\\src\\SDKs\\IotCentral\\Management.IotCentral"; + public static readonly String GithubForkName = "Azure"; + public static readonly String GithubBranchName = "master"; + public static readonly String GithubCommidId = "5f594f3fdc0e6acc8e7b4abef716f7433252e969"; + public static readonly String CodeGenerationErrors = ""; + public static readonly String GithubRepoName = "azure-rest-api-specs"; + // END: Code Generation Metadata Section } } + diff --git a/src/SDKs/IotCentral/Management.IotCentral/Microsoft.Azure.Management.IotCentral.csproj b/src/SDKs/IotCentral/Management.IotCentral/Microsoft.Azure.Management.IotCentral.csproj index e866323a53fd4..eddab93c240af 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/Microsoft.Azure.Management.IotCentral.csproj +++ b/src/SDKs/IotCentral/Management.IotCentral/Microsoft.Azure.Management.IotCentral.csproj @@ -8,11 +8,13 @@ Provides management capabilities for Microsoft Azure IotCentral. Microsoft Azure IotCentral Management Microsoft.Azure.Management.IotCentral - 1.0.0 + 2.0.0 Microsoft Azure IotCentral;IotCentral management;IotCentral; diff --git a/src/SDKs/IotCentral/Management.IotCentral/Properties/AssemblyInfo.cs b/src/SDKs/IotCentral/Management.IotCentral/Properties/AssemblyInfo.cs index e43beaaed9d4a..b2940fe822292 100644 --- a/src/SDKs/IotCentral/Management.IotCentral/Properties/AssemblyInfo.cs +++ b/src/SDKs/IotCentral/Management.IotCentral/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ [assembly: AssemblyTitle("Microsoft Azure IotCentral Management Library")] [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure IotCentral Resources.")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Microsoft Azure .NET SDK")] diff --git a/src/SDKs/_metadata/iotcentral_resource-manager.txt b/src/SDKs/_metadata/iotcentral_resource-manager.txt index bbb9ac1eb2709..272b8c2e519f4 100644 --- a/src/SDKs/_metadata/iotcentral_resource-manager.txt +++ b/src/SDKs/_metadata/iotcentral_resource-manager.txt @@ -3,18 +3,12 @@ AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/iotcentral/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\src\azure-sdk-for-net\src\SDKs\IotCentral\Management.IotCentral -2018-08-08 20:52:03 UTC -1) azure-rest-api-specs repository information +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/iotcentral/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\Users\rodelga\Documents\Repos\azure-sdk-for-net\src\SDKs\IotCentral\Management.IotCentral +2018-10-22 06:22:06 UTC +Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: d788c1647971b92fbf6ae11901cb3691a6574f93 - -2) AutoRest information +Commit: 5f594f3fdc0e6acc8e7b4abef716f7433252e969 +AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 - - -Latest installed version: - -